diff --git a/source/agent-remote/agent-install.sh b/source/agent-remote/agent-install.sh index b4d78b8..88c2ba4 100755 --- a/source/agent-remote/agent-install.sh +++ b/source/agent-remote/agent-install.sh @@ -21,15 +21,15 @@ fi _check_required_env_vars "AGENT_PATH" function install_bb64() { + BB64_path="${AGENT_PATH}/bb64" ARCH=$(uname -m) - - if ! curl -fsSL "https://getbin.xyz/bb64:latest-${ARCH}" | \ - bash -s -- "$AGENT_PATH" "$(id -u "$USER"):$(id -g "$USER")"; then + 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 - if ! VER=$("$AGENT_PATH/bb64" -v); then + if ! VER=$("${BB64_path}" version); then _die "bb64 did not install correctly." fi