This commit is contained in:
@@ -32,20 +32,19 @@ function install_bb64() {
|
||||
_die "Curl is not installed. Curl is required for agent installation."
|
||||
fi
|
||||
|
||||
curl -fsSL "https://gitea.jde.nz/public/bb64/releases/download/latest/install.sh" | bash -s -- "$AGENT_LOCAL_PATH" "$(id -u $USER):$(id -g $USER)"
|
||||
|
||||
# test result code from curl
|
||||
if [ $? -ne 0 ]; then
|
||||
BB64_path="${AGENT_LOCAL_PATH}/bb64"
|
||||
ARCH=$(uname -m)
|
||||
if ! curl "http://getbin.xyz/bb64:latest-${ARCH}" > "${BB64_path}"; then
|
||||
_die "Failed to install bb64. Curl returned non-zero exit code."
|
||||
fi
|
||||
chown "$(id -u "$USER"):$(id -g "$USER")" "${BB64_path}"
|
||||
|
||||
# test if bb64 is installed
|
||||
"$AGENT_LOCAL_PATH/bb64" -v
|
||||
if [ $? -ne 0 ]; then
|
||||
if ! VER=$("${BB64_path}" version); then
|
||||
_die "bb64 did not install correctly."
|
||||
fi
|
||||
|
||||
echo "bb64 installed successfully."
|
||||
echo "bb64 v$VER installed."
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user