fly installer update.

Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
This commit is contained in:
Volkan Özçelik committed 2026-10-05 10:38:28 -07:00
1 parent ab0e5165b4
commit 791f61de12
1 file changed
+10 -4
+10 -4
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Copyright 2020-2025 the Pinniped contributors. All Rights Reserved.
# Copyright 2020-2026 the Pinniped contributors. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
@@ -10,9 +10,15 @@ script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Define some env vars
source "$script_dir/fly-helpers.sh"
# Install the fly cli if needed
if [[ ! -f "$FLY_CLI" ]]; then
curl -fL "$CONCOURSE_URL/api/v1/cli?arch=amd64&platform=darwin" -o "$FLY_CLI"
# Install the fly cli if missing or unable to run on this platform.
if [[ ! -x "$FLY_CLI" ]] || ! "$FLY_CLI" --version >/dev/null 2>&1; then
fly_arch="$(uname -m)"
case "$fly_arch" in
x86_64) fly_arch="amd64" ;;
aarch64) fly_arch="arm64" ;;
esac
fly_platform="$(uname -s | tr '[:upper:]' '[:lower:]')"
curl -fL "$CONCOURSE_URL/api/v1/cli?arch=${fly_arch}&platform=${fly_platform}" -o "$FLY_CLI"
chmod 755 "$FLY_CLI"
fi