Update prysm.sh to support Mac M1 chip (#9000)

Updated for Apple M1 users.

Co-authored-by: mrabino1 <mrabino1@gmail.com>
This commit is contained in:
Preston Van Loon 2021-06-07 13:51:05 -05:00 committed by GitHub
parent aa4c21d6df
commit 26c4e7b527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,9 +72,16 @@ if [ "$#" -lt 1 ]; then
fi
readonly wrapper_dir="$(dirname "$(get_realpath "${BASH_SOURCE[0]}")")/dist"
# for Apple M1s
if [ "$(uname -s)" == "Darwin" ] && [ "$(uname -m)" == "arm64" ]
then
arch="amd64"
else
arch=$(uname -m)
arch=${arch/x86_64/amd64}
arch=${arch/aarch64/arm64}
fi
readonly os_arch_suffix="$(uname -s | tr '[:upper:]' '[:lower:]')-$arch"
system=""