From f5ea8c70b43492f6e98fa231122b0c07f305729d Mon Sep 17 00:00:00 2001
From: Robert Peteuil <robert@peteuil.com>
Date: Thu, 25 Jun 2020 09:53:41 -0700
Subject: [PATCH] add cpu check for arm64

---
 terraform-install.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/terraform-install.sh b/terraform-install.sh
index 3d7d282..d0c6bc3 100755
--- a/terraform-install.sh
+++ b/terraform-install.sh
@@ -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
@@ -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