diff --git a/install.sh b/install.sh index 9df28c0..62ec7ec 100755 --- a/install.sh +++ b/install.sh @@ -22,22 +22,11 @@ else exit 1 fi -# 2. Get latest release tag from Gitea API -# ----------------------------------------------------------------------------- -REPO_API="https://gitea.jde.nz/api/v1/repos/j/bb64/releases/latest" -if command -v jq >/dev/null 2>&1; then - TAG=$(curl -s "$REPO_API" | jq -r '.tag_name') -else - TAG=$(curl -s "$REPO_API" | grep -o '"tag_name"[ ]*:[ ]*\"[^\"]*\"' | head -1 | sed 's/.*: *\"\\([^\"]*\\)\"/\\1/') -fi - -echo "Latest version of bb64 is: $TAG" - # 3. Download the appropriate binary to a temp directory # ----------------------------------------------------------------------------- TMPDIR=$(mktemp -d) trap 'rm -rf "$TMPDIR"' EXIT -URL="https://gitea.jde.nz/j/bb64/releases/download/$TAG/$BIN" +URL="https://gitea.jde.nz/j/bb64/releases/download/latest/$BIN" echo "Downloading $BIN from $URL..." curl -fsSL -o "$TMPDIR/bb64" "$URL" @@ -55,5 +44,8 @@ rm "$TMPDIR/bb64" # ----------------------------------------------------------------------------- echo "bb64 installed successfully to /usr/local/bin/bb64 (version $TAG, arch $ARCH)" echo " " +echo "Update bb64 with:" +echo " bb64 -u" +echo " " echo "try it out with:" echo " bb64 ZWNobyAiSGVsbG8td29ybGQhIGJiNjQgaXMgd29ya2luZy4i" diff --git a/version.h b/version.h index 4c620d5..9844840 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -static const char *VERSION = "21"; +static const char *VERSION = "22";