bb64 release v20
This commit is contained in:
parent
02559d1519
commit
207b27a07e
8
bb64.cpp
8
bb64.cpp
@ -54,11 +54,9 @@ int update_bb64()
|
|||||||
|
|
||||||
// determine path to this executable
|
// determine path to this executable
|
||||||
std::filesystem::path bb64_path = std::filesystem::canonical("/proc/self/exe");
|
std::filesystem::path bb64_path = std::filesystem::canonical("/proc/self/exe");
|
||||||
std::cout << "bb64 path: " << bb64_path << std::endl;
|
|
||||||
|
|
||||||
// determine the architecture of the system
|
// determine the architecture of the system
|
||||||
std::string arch = get_arch();
|
std::string arch = get_arch();
|
||||||
std::cout << "arch: " << arch << std::endl;
|
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
@ -69,8 +67,10 @@ int update_bb64()
|
|||||||
bash_script += " curl -fsSL " + url + " -o /target/bb64 &&";
|
bash_script += " curl -fsSL " + url + " -o /target/bb64 &&";
|
||||||
bash_script += " chmod +x /target/bb64\"";
|
bash_script += " chmod +x /target/bb64\"";
|
||||||
|
|
||||||
std::cout << "bash_script: " << std::endl
|
std::cout << "Updating " << bb64_path << " to the latest " << arch << " version." << std::endl;
|
||||||
<< bash_script << std::endl;
|
|
||||||
|
// std::cout << "bash_script: " << std::endl
|
||||||
|
// << bash_script << std::endl;
|
||||||
|
|
||||||
// run the bash script
|
// run the bash script
|
||||||
execlp("bash", "bash", "-c", bash_script.c_str(), (char *)nullptr);
|
execlp("bash", "bash", "-c", bash_script.c_str(), (char *)nullptr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user