This commit is contained in:
@ -24,6 +24,37 @@ check_prerequisites() {
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
install_bb64() {
|
||||
# install bb64 into EXECUTABLES
|
||||
_check_required_env_vars EXECUTABLES
|
||||
|
||||
ARCH=$(uname -m)
|
||||
if [[ "$ARCH" == "x86_64" ]]; then
|
||||
BIN=bb64.amd64
|
||||
elif [[ "$ARCH" == "aarch64" || "$ARCH" == "arm64" ]]; then
|
||||
BIN=bb64.arm64
|
||||
else
|
||||
echo "Unsupported architecture: $ARCH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# create the executables directory if it doesn't exist
|
||||
mkdir -p ${EXECUTABLES}
|
||||
|
||||
# download bb64
|
||||
if ! curl -fsSL https://gitea.jde.nz/public/bb64/releases/download/latest/bb64.${ARCH} -o ${EXECUTABLES}/bb64; then
|
||||
echo "Failed to download bb64 for architecture: $ARCH" >&2
|
||||
exit 1
|
||||
fi
|
||||
chmod +x ${EXECUTABLES}/bb64
|
||||
}
|
||||
|
||||
|
||||
check_prerequisites
|
||||
|
||||
# install bb64
|
||||
install_bb64
|
||||
|
||||
exit 0
|
||||
|
||||
|
Reference in New Issue
Block a user