From 2a6b92ed130ade1ea7542ee210e6957427a0aa81 Mon Sep 17 00:00:00 2001 From: dacctal <120422854+dacctal@users.noreply.github.com> Date: Sat, 14 Mar 2026 12:11:52 +0000 Subject: lua build system integration --- src/fetch_git.cc | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'src/fetch_git.cc') diff --git a/src/fetch_git.cc b/src/fetch_git.cc index 3306e42..b8df6bb 100644 --- a/src/fetch_git.cc +++ b/src/fetch_git.cc @@ -4,21 +4,16 @@ int fetch_git(Pkg pkg) { std::string clone_cmds[] = { - "git -c advice.detachedHead=false clone --depth 1 " + pkg.url + " " + - pkg.src.c_str(), - "git -c advice.detachedHead=false clone --branch " + pkg.ver + - " --depth 1 " + pkg.url + " " + pkg.src.c_str()}; + "git -c advice.detachedHead=false clone --depth 1 " + pkg.url + + " " + pkg.src.c_str(), + "git -c advice.detachedHead=false clone --branch " + pkg.ver + + " --depth 1 " + pkg.url + " " + pkg.src.c_str() + }; if (strcmp(pkg.ver.c_str(), "HEAD") == 0) { - if (WEXITSTATUS(system(clone_cmds[0].c_str())) == 0x10) { - return 0; - } else { - return 1; - } + if (WEXITSTATUS(system(clone_cmds[0].c_str())) == 0x10) { return 0; } + else { return 1; } } else { - if (WEXITSTATUS(system(clone_cmds[1].c_str())) == 0x10) { - return 0; - } else { - return 1; - } + if (WEXITSTATUS(system(clone_cmds[1].c_str())) == 0x10) { return 0; } + else { return 1; } } } -- cgit v1.2.3