diff options
| author | dacctal <120422854+dacctal@users.noreply.github.com> | 2026-03-14 12:11:52 +0000 |
|---|---|---|
| committer | dacctal <120422854+dacctal@users.noreply.github.com> | 2026-03-14 12:11:52 +0000 |
| commit | 2a6b92ed130ade1ea7542ee210e6957427a0aa81 (patch) | |
| tree | 1e235b2116feddd3dcde0db9135ce9871801e2f3 /src/fetch_git.cc | |
| parent | 97d70a6f8252b15928ca7f51386df791dedf0067 (diff) | |
lua build system integration
Diffstat (limited to 'src/fetch_git.cc')
| -rw-r--r-- | src/fetch_git.cc | 23 |
1 files changed, 9 insertions, 14 deletions
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; } } } |
