diff options
| author | dacctal <dacctal@symlinx.net> | 2026-05-02 08:38:13 +0000 |
|---|---|---|
| committer | dacctal <dacctal@symlinx.net> | 2026-05-02 08:38:13 +0000 |
| commit | 44eb727dc537403be092326639a5b7c6d7182146 (patch) | |
| tree | 1459603e69496400c22f53dcec67ec2c3348400a /src/fetch_git.cc | |
| parent | c555d4c25b5526c37e94ee2c593f34bdf28b159e (diff) | |
fixed like half of everything idk, you can install stuff now
Diffstat (limited to 'src/fetch_git.cc')
| -rw-r--r-- | src/fetch_git.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/fetch_git.cc b/src/fetch_git.cc index c4fd3b2..dc5015b 100644 --- a/src/fetch_git.cc +++ b/src/fetch_git.cc @@ -1,19 +1,22 @@ #include <cstring> +#include <iostream> #include "fetch_git.hh" #include "vars.hh" int fetch_git(Pkg pkg) { std::string clone_cmds[] = { - "git -c advice.detachedHead=false clone " + pkg.url + - " " + pkg.src.c_str(), - "git -c advice.detachedHead=false clone --branch " + pkg.ver + - " " + pkg.url + " " + pkg.src.c_str() + "git -c advice.detachedHead=false clone " + pkg.url + " " + pkg.src.c_str(), + "git -c advice.detachedHead=false clone --branch " + pkg.ver + " " + pkg.url + " " + pkg.src.c_str() }; if (strcmp(pkg.ver.c_str(), "HEAD") == 0) { - if (system(clone_cmds[0].c_str()) != 0) { system(clone_cmds[0].c_str()); } + if (system(clone_cmds[0].c_str()) != 0) { + std::cout << "clone failed" << std::endl; + } } else { - if (system(clone_cmds[2].c_str()) != 0) { system(clone_cmds[1].c_str()); } + if (system(clone_cmds[1].c_str()) != 0) { + std::cout << "clone failed" << std::endl; + } } return 0; } |
