This commit is contained in:
Your Name 2025-05-12 21:54:16 +12:00
parent 5af5399508
commit 928bf05196
3 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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;

View File

@ -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"