From 17c46442bd2c6dc5281ce33a06491d31369ef181 Mon Sep 17 00:00:00 2001 From: dabruh <11458706-dabruh@users.noreply.gitlab.com> Date: Fri, 15 Sep 2023 13:42:07 +0200 Subject: [PATCH] Adjust Krew installation function --- setup_system.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/setup_system.sh b/setup_system.sh index 43e6637..19a64e4 100755 --- a/setup_system.sh +++ b/setup_system.sh @@ -197,14 +197,16 @@ function setup_brew_formulas() { } function setup_krew() { - cd "$(mktemp -d)" && - OS="$(uname | tr '[:upper:]' '[:lower:]')" && - ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" && - KREW="krew-${OS}_${ARCH}" && - curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" && - tar zxvf "${KREW}.tar.gz" && - ./"${KREW}" install krew + set -e + cd "$(mktemp -d)" + OS="$(uname | tr '[:upper:]' '[:lower:]')" + ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" + KREW="krew-${OS}_${ARCH}" + curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" + tar zxvf "${KREW}.tar.gz" + ./"${KREW}" install krew export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" + set +e } function setup_krew_plugins() {