Skip to content

Commit 69206fc

Browse files
authored
fix(install.sh): move ARCH detection so it works also for mac (mudler#2646)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
1 parent 2c94e15 commit 69206fc

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Diff for: docs/static/install.sh

+7-6
Original file line numberDiff line numberDiff line change
@@ -500,12 +500,6 @@ install_binary_darwin() {
500500
install_binary() {
501501
[ "$(uname -s)" = "Linux" ] || fatal 'This script is intended to run on Linux only.'
502502

503-
ARCH=$(uname -m)
504-
case "$ARCH" in
505-
x86_64) ARCH="x86_64" ;;
506-
aarch64|arm64) ARCH="arm64" ;;
507-
*) fatal "Unsupported architecture: $ARCH" ;;
508-
esac
509503

510504
IS_WSL2=false
511505

@@ -578,6 +572,13 @@ install_binary() {
578572

579573
OS="$(uname -s)"
580574

575+
ARCH=$(uname -m)
576+
case "$ARCH" in
577+
x86_64) ARCH="x86_64" ;;
578+
aarch64|arm64) ARCH="arm64" ;;
579+
*) fatal "Unsupported architecture: $ARCH" ;;
580+
esac
581+
581582
if [ "$OS" == "Darwin" ]; then
582583
install_binary_darwin
583584
exit 0

0 commit comments

Comments
 (0)