From 91f65b3441d92ed1d5d077f0dcdbb3997dda89dd Mon Sep 17 00:00:00 2001 From: John Matthews Date: Sat, 29 Jan 2022 11:17:48 -0500 Subject: [PATCH] Install arch appropriate build if the 'arch' command is present --- hack/install_kustomize.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hack/install_kustomize.sh b/hack/install_kustomize.sh index 2af293d30..3c2395dfe 100755 --- a/hack/install_kustomize.sh +++ b/hack/install_kustomize.sh @@ -95,13 +95,17 @@ trap cleanup EXIT ERR pushd "$tmpDir" >& /dev/null opsys=windows -arch=amd64 if [[ "$OSTYPE" == linux* ]]; then opsys=linux elif [[ "$OSTYPE" == darwin* ]]; then opsys=darwin fi +arch=amd64 +if command -v arch &> /dev/null; then + arch=$(arch) +fi + releases=$(curl -s $release_url) if [[ $releases == *"API rate limit exceeded"* ]]; then