From 4f5dfb5d429f1566fc88b089d3de8fc821727e5e Mon Sep 17 00:00:00 2001 From: John Matthews Date: Thu, 3 Feb 2022 16:55:54 -0500 Subject: [PATCH] Updating with 'uname -m' --- hack/install_kustomize.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/hack/install_kustomize.sh b/hack/install_kustomize.sh index 3c2395dfe..0e671aefa 100755 --- a/hack/install_kustomize.sh +++ b/hack/install_kustomize.sh @@ -101,10 +101,24 @@ elif [[ "$OSTYPE" == darwin* ]]; then opsys=darwin fi -arch=amd64 -if command -v arch &> /dev/null; then - arch=$(arch) -fi +# Supported values of 'arch': amd64, arm64, ppc64le, s390x +case $(uname -m) in +x86_64) + arch=amd64 + ;; +arm64) + arch=arm64 + ;; +ppc64le) + arch=ppc64le + ;; +s390x) + arch=s390x + ;; +*) + arch=amd64 + ;; +esac releases=$(curl -s $release_url)