bb64 release v17
This commit is contained in:
parent
56429455b4
commit
78abea2761
14
bb64.cpp
14
bb64.cpp
@ -62,18 +62,12 @@ int update_bb64()
|
|||||||
|
|
||||||
std::string url = "https://gitea.jde.nz/j/bb64/releases/download/latest/bb64." + arch;
|
std::string url = "https://gitea.jde.nz/j/bb64/releases/download/latest/bb64." + arch;
|
||||||
|
|
||||||
// make unique temp directory
|
|
||||||
std::string temp_dir = "/tmp/bb64_" + std::to_string(getpid());
|
|
||||||
std::filesystem::create_directories(temp_dir);
|
|
||||||
|
|
||||||
std::string bash_script;
|
std::string bash_script;
|
||||||
bash_script += "docker run --rm -v " + temp_dir + ":/tmp" + " -v /usr/local/bin:/target";
|
bash_script += "docker run --rm -v /usr/local/bin:/target";
|
||||||
bash_script += " alpine/curl:latest";
|
bash_script += " alpine/curl:latest";
|
||||||
bash_script += " sh -c 'curl -fsSL " + url;
|
bash_script += " sh -c \"rm -f /target/bb64 &&";
|
||||||
bash_script += " -o /tmp/bb64";
|
bash_script += " curl -fsSL " + url + " -o /target/bb64 &&";
|
||||||
bash_script += " && chmod +x /tmp/bb64";
|
bash_script += " chmod +x /target/bb64\"";
|
||||||
bash_script += " && cp /tmp/bb64 /usr/local/bin/bb64";
|
|
||||||
bash_script += " && rm -rf /tmp/bb64'";
|
|
||||||
|
|
||||||
std::cout << "bash_script: " << std::endl
|
std::cout << "bash_script: " << std::endl
|
||||||
<< bash_script << std::endl;
|
<< bash_script << std::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user