fix(install.sh): move ARCH detection so it works also for mac (#2646)

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2024-06-24 10:34:35 +02:00 committed by GitHub
parent 2c94e15746
commit 69206fcd4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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