Skip to content

Commit

Permalink
add cpu check for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
robertpeteuil committed Jun 25, 2020
1 parent 3ed699e commit f5ea8c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions terraform-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ set -e
# sudoInstall=true

scriptname=$(basename "$0")
scriptbuildnum="1.5.3"
scriptbuilddate="2020-02-20"
scriptbuildnum="1.5.4"
scriptbuilddate="2020-06-25"

# CHECK DEPENDANCIES AND SET NET RETRIEVAL TOOL
if ! unzip -h 2&> /dev/null; then
Expand Down Expand Up @@ -98,7 +98,7 @@ if [[ -z "$VERSION" ]]; then
fi
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
if [[ "$OS" == "linux" ]]; then
PROC=$(lscpu 2> /dev/null | awk '/Architecture/ {if($2 == "x86_64") {print "amd64"; exit} else if($2 ~ /arm/) {print "arm"; exit} else {print "386"; exit}}')
PROC=$(lscpu 2> /dev/null | awk '/Architecture/ {if($2 == "x86_64") {print "amd64"; exit} else if($2 ~ /arm/) {print "arm"; exit} else if($2 ~ /aarch64/) {print "arm"; exit} else {print "386"; exit}}')
if [[ -z $PROC ]]; then
PROC=$(cat /proc/cpuinfo | awk '/model\ name/ {if($0 ~ /ARM/) {print "arm"; exit}}')
fi
Expand Down

0 comments on commit f5ea8c7

Please sign in to comment.