bb64 release v22
This commit is contained in:
parent
c67fb1447b
commit
1339150167
16
install.sh
16
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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user