bb64 release v23
This commit is contained in:
parent
1339150167
commit
5af5399508
10
bb64.cpp
10
bb64.cpp
@ -58,12 +58,16 @@ 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;
|
||||||
|
|
||||||
|
// download new version, preserve permissions and ownership
|
||||||
std::string bash_script;
|
std::string bash_script;
|
||||||
bash_script += "docker run --rm -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 \"rm -f /target/bb64 &&";
|
bash_script += " sh -c \"";
|
||||||
bash_script += " curl -fsSL " + url + " -o /target/bb64 &&";
|
bash_script += " curl -fsSL " + url + " -o /target/bb64_temp &&";
|
||||||
bash_script += " chmod +x /target/bb64\"";
|
bash_script += " chmod --reference=/target/bb64 /target/bb64_temp &&";
|
||||||
|
bash_script += " chown --reference=/target/bb64 /target/bb64_temp &&";
|
||||||
|
bash_script += " mv /target/bb64_temp /target/bb64 &&";
|
||||||
|
bash_script += "\"";
|
||||||
|
|
||||||
std::cout << "Updating " << bb64_path << " to the latest " << arch << " version." << std::endl;
|
std::cout << "Updating " << bb64_path << " to the latest " << arch << " version." << std::endl;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user