- __PKG_ARCH=x64
-
- OSName=$(uname -s)
- case $OSName in
- Darwin)
- OS=OSX
- __PKG_RID=osx
- ulimit -n 2048
- # Format x.y.z as single integer with three digits for each part
- VERSION=`sw_vers -productVersion| sed -e 's/\./ /g' | xargs printf "%03d%03d%03d"`
- if [ "$VERSION" -lt 010012000 ]; then
- echo error: macOS version `sw_vers -productVersion` is too old. 10.12 is needed as minimum.
- exit 1
- fi
- ;;
-
- Linux)
- __PKG_RID=linux
- OS=Linux
-
- if [ -e /etc/os-release ]; then
- source /etc/os-release
- if [[ $ID == "alpine" ]]; then
- # remove the last version digit
- VERSION_ID=${VERSION_ID%.*}
- __PKG_RID=alpine.$VERSION_ID
- fi
- elif [ -e /etc/redhat-release ]; then
- redhatRelease=$(</etc/redhat-release)
- if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then
- __PKG_RID=rhel.6
- fi
- fi
-
- ;;
-
- *)
- echo "Unsupported OS '$OSName' detected. Downloading linux-$__PKG_ARCH tools."
- OS=Linux
- __PKG_RID=linux
- ;;
- esac
- __DOTNET_PKG=dotnet-sdk-${__DOTNET_TOOLS_VERSION}-$__PKG_RID-$__PKG_ARCH
+if [ "$(uname -m)" = "armhf" ] || [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then
+ if [ "$(uname -m)" = "armhf" ]; then
+ __PKG_ARCH=arm