add arm and arm64 to rawinstall script

pull/77/head
Simon Let 6 years ago
parent 990fde413f
commit 2ebccfab6a
  1. 29
      scripts/rawinstall.sh

@ -49,18 +49,37 @@ else
OS=unknown
fi
if [ "$(uname -m)" = "x86_64" ]; then
case "$(uname -m)" in
x86_64)
ARCH=amd64
elif [ "$(uname -m)" = "x86" ] || [ "$(uname -m)" = "i386" ] || [ "$(uname -m)" = "i686" ]; then
;;
x86|i386|i686)
ARCH=386
else
;;
arm64|aarch64|armv8b|armv8l)
ARCH=arm64
;;
arm)
ARCH=armv6
;;
*)
ARCH=unknown
fi
;;
esac
if [ "$OS" = darwin ]; then
if [ "$ARCH" = armv6 ] || [ "$ARCH" = arm64 ]; then
echo "It seems that you are running macOS on arm - exiting!"
echo "Expected Linux or macOS on x86_64 or i386 (or Linux on arm or arm64)"
echo "Got OS: $(uname) (uname)"
echo "Got ARCH: $(uname -m) (uname -m)"
exit 1
fi
fi
if [ "$OS" = unknown ] || [ "$ARCH" = unknown ]; then
echo "Couldn't detect your OS and architecture - exiting!"
echo "Expected Linux or macOS on x86_64 or i386"
echo "Expected Linux or macOS on x86_64 or i386 (or Linux on arm or arm64)"
echo "Got OS: $(uname) (uname)"
echo "Got ARCH: $(uname -m) (uname -m)"
exit 1

Loading…
Cancel
Save