From 78abea2761afae3e0368c18b7da4ffa0600a5c1e Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 12 May 2025 21:06:09 +1200 Subject: [PATCH] bb64 release v17 --- bb64.cpp | 14 ++++---------- version.h | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/bb64.cpp b/bb64.cpp index 6ce1b9e..2ff8f0a 100644 --- a/bb64.cpp +++ b/bb64.cpp @@ -62,18 +62,12 @@ int update_bb64() 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; - 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 += " sh -c 'curl -fsSL " + url; - bash_script += " -o /tmp/bb64"; - bash_script += " && chmod +x /tmp/bb64"; - bash_script += " && cp /tmp/bb64 /usr/local/bin/bb64"; - bash_script += " && rm -rf /tmp/bb64'"; + bash_script += " sh -c \"rm -f /target/bb64 &&"; + bash_script += " curl -fsSL " + url + " -o /target/bb64 &&"; + bash_script += " chmod +x /target/bb64\""; std::cout << "bash_script: " << std::endl << bash_script << std::endl; diff --git a/version.h b/version.h index 9746c6f..17a50e9 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -static const char *VERSION = "16"; +static const char *VERSION = "17";