From 69206fcd4b5c0a506e28d35e6e3dfbf72ac29925 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 24 Jun 2024 10:34:35 +0200 Subject: [PATCH] fix(install.sh): move ARCH detection so it works also for mac (#2646) Signed-off-by: Ettore Di Giacinto --- docs/static/install.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/static/install.sh b/docs/static/install.sh index c74c7813..8824486e 100644 --- a/docs/static/install.sh +++ b/docs/static/install.sh @@ -500,12 +500,6 @@ install_binary_darwin() { install_binary() { [ "$(uname -s)" = "Linux" ] || fatal 'This script is intended to run on Linux only.' - ARCH=$(uname -m) - case "$ARCH" in - x86_64) ARCH="x86_64" ;; - aarch64|arm64) ARCH="arm64" ;; - *) fatal "Unsupported architecture: $ARCH" ;; - esac IS_WSL2=false @@ -578,6 +572,13 @@ install_binary() { OS="$(uname -s)" +ARCH=$(uname -m) +case "$ARCH" in + x86_64) ARCH="x86_64" ;; + aarch64|arm64) ARCH="arm64" ;; + *) fatal "Unsupported architecture: $ARCH" ;; +esac + if [ "$OS" == "Darwin" ]; then install_binary_darwin exit 0