diff --git a/README.md b/README.md index 5ff1414..0b7ab66 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # Installation ``` -curl -fsSL -o bb64_install.sh https://gitea.jde.nz/j/bb64/raw/branch/main/install.sh && sudo bash ./bb64_install.sh && rm bb64_install.sh +curl -fsSL -o bb64_install.sh https://gitea.jde.nz/public/bb64/raw/branch/main/install.sh && sudo bash ./bb64_install.sh && rm bb64_install.sh ``` # Use diff --git a/bb64.cpp b/bb64.cpp index 7e7cbe9..19072ef 100644 --- a/bb64.cpp +++ b/bb64.cpp @@ -56,17 +56,17 @@ int update_bb64() // determine the architecture of the system std::string arch = get_arch(); - std::string url = "https://gitea.jde.nz/j/bb64/releases/download/latest/bb64." + arch; + std::string url = "https://gitea.jde.nz/public/bb64/releases/download/latest/bb64." + arch; // download new version, preserve permissions and ownership std::string bash_script; bash_script += "docker run --rm -v /usr/local/bin:/target"; - bash_script += " alpine/curl:latest"; + bash_script += " gitea.jde.nz/public/debian-curl:latest"; bash_script += " sh -c \""; bash_script += " curl -fsSL " + url + " -o /target/bb64_temp &&"; 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 += " mv /target/bb64_temp /target/bb64"; bash_script += "\""; std::cout << "Updating " << bb64_path << " to the latest " << arch << " version." << std::endl; diff --git a/install.sh b/install.sh index 62ec7ec..7241d9e 100755 --- a/install.sh +++ b/install.sh @@ -3,7 +3,7 @@ set -e # Installs bb64 on the local machine. # 1. determines the architecture of the local machine -# 2. downloads the appropriate bb64 binary from the latest public release on Gitea (https://gitea.jde.nz/j/bb64/releases) +# 2. downloads the appropriate bb64 binary from the latest public release on Gitea (https://gitea.jde.nz/public/bb64/releases) # 3. makes the bb64 binary executable # 4. moves the bb64 binary to /usr/local/bin # 5. prints a message to the user @@ -26,7 +26,7 @@ fi # ----------------------------------------------------------------------------- TMPDIR=$(mktemp -d) trap 'rm -rf "$TMPDIR"' EXIT -URL="https://gitea.jde.nz/j/bb64/releases/download/latest/$BIN" +URL="https://gitea.jde.nz/public/bb64/releases/download/latest/$BIN" echo "Downloading $BIN from $URL..." curl -fsSL -o "$TMPDIR/bb64" "$URL"