Update setup-node-ubuntu.bash to replace `arch` call with portable call to `uname -a`

This commit is contained in:
richdex14 2017-09-03 20:47:40 -06:00
parent 561a2e2fa1
commit 31b92cdadb
1 changed files with 5 additions and 5 deletions

View File

@ -27,15 +27,15 @@ then
NODEJS_NAME="iojs" NODEJS_NAME="iojs"
fi fi
if [ -n "$(arch | grep aarch64)" ]; then if [ -n "$(uname -a | grep aarch64)" ]; then
ARCH="arm64" ARCH="arm64"
elif [ -n "$(arch | grep 64)" ]; then elif [ -n "$(uname -a | grep 64)" ]; then
ARCH="x64" ARCH="x64"
elif [ -n "$(arch | grep armv8l)" ]; then elif [ -n "$(uname -a | grep armv8l)" ]; then
ARCH="arm64" ARCH="arm64"
elif [ -n "$(arch | grep armv7l)" ]; then elif [ -n "$(uname -a | grep armv7l)" ]; then
ARCH="armv7l" ARCH="armv7l"
elif [ -n "$(arch | grep armv6l)" ]; then elif [ -n "$(uname -a | grep armv6l)" ]; then
ARCH="armv6l" ARCH="armv6l"
else else
ARCH="x86" ARCH="x86"