Add arm64 support

This commit is contained in:
Josué Tille
2020-12-07 16:10:16 +01:00
parent 0ae8f8f87f
commit a9d9989b49
15 changed files with 77 additions and 5 deletions

View File

@ -14,14 +14,16 @@ SSH_PATH="$DATADIR/.ssh"
# Detect the system architecture to download the right tarball
# NOTE: `uname -m` is more accurate and universal than `arch`
# See https://en.wikipedia.org/wiki/Uname
if [ -n "$(uname -m | grep 64)" ]; then
architecture="x86-64"
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
architecture="arm64"
elif [ -n "$(uname -m | grep 64)" ]; then
architecture="x86-64"
elif [ -n "$(uname -m | grep 86)" ]; then
architecture="i386"
architecture="i386"
elif [ -n "$(uname -m | grep armv7)" ]; then
architecture="armv7"
architecture="armv7"
elif [ -n "$(uname -m | grep arm)" ]; then
architecture="arm"
architecture="arm"
else
ynh_die --message "Unable to detect your achitecture, please open a bug describing \
your hardware and the result of the command \"uname -m\"." 1