Add M1 platform support

This commit is contained in:
Jonny Barnes 2021-07-17 18:24:07 +01:00
parent 6bc31a2a4a
commit 971b9730d4
2 changed files with 12 additions and 5 deletions

View file

@ -1,7 +1,12 @@
export PLATFORM="unkown"
unamestr=$(uname -s)
if [[ "$unamestr" == 'Linux' ]]; then
osname=$(uname -s)
cputpye=£(uname -m)
if [[ "$osname" == 'Linux' ]]; then
export PLATFORM="linux"
elif [[ "$unamestr" == 'Darwin' ]]; then
export PLATFORM="osx"
fi
elif [[ "$osname" == 'Darwin' ]]; then
if [[ "$cputpye" == 'x86_64' ]]; then
export PLATFORM="osx"
elif [[ "$cputype" == 'arm64' ]]; then
export PLATFORM="osx-m1"
fi
fi