From 42f91fc8f9467f9f7fb9ac7e6349b33964b63127 Mon Sep 17 00:00:00 2001 From: Guillaume Lambert Date: Wed, 10 Mar 2021 14:02:13 +0100 Subject: [COMMON] Fix ${foo:3[:1]} bashisms pointed out by checkbashisms Issue-ID: OOM-264 Signed-off-by: Guillaume Lambert Change-Id: Ief3b2595a55f0e7a0a2e7ab05857848c99ce42f9 --- kubernetes/helm/plugins/deploy/deploy.sh | 8 ++++---- kubernetes/helm/plugins/undeploy/undeploy.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'kubernetes/helm') diff --git a/kubernetes/helm/plugins/deploy/deploy.sh b/kubernetes/helm/plugins/deploy/deploy.sh index d863a152a5..536be7b4a9 100755 --- a/kubernetes/helm/plugins/deploy/deploy.sh +++ b/kubernetes/helm/plugins/deploy/deploy.sh @@ -96,9 +96,9 @@ deploy() { RELEASE=$1 CHART_URL=$2 - FLAGS=${@:3} - CHART_REPO="$(echo "$CHART_URL" |cut -d'/' -f1)" - CHART_NAME="$(echo "$CHART_URL" |cut -d'/' -f2)" + FLAGS=$(echo ${@} | sed 's/^ *[^ ]* *[^ ]* *//') + CHART_REPO="$(echo "$CHART_URL" | cut -d'/' -f1)" + CHART_NAME="$(echo "$CHART_URL" | cut -d'/' -f2)" if expr "$HELM_VER" : "v3\..*" ; then CACHE_DIR=~/.local/share/helm/plugins/deploy/cache else @@ -287,7 +287,7 @@ case "${1:-"help"}" in usage ;; *) - deploy $1 $2 ${@:3} + deploy $1 $2 $(echo ${@} | sed 's/^ *[^ ]* *[^ ]* *//') ;; esac diff --git a/kubernetes/helm/plugins/undeploy/undeploy.sh b/kubernetes/helm/plugins/undeploy/undeploy.sh index 35fc4ca251..72c64244c0 100755 --- a/kubernetes/helm/plugins/undeploy/undeploy.sh +++ b/kubernetes/helm/plugins/undeploy/undeploy.sh @@ -45,7 +45,7 @@ case "${1:-"help"}" in usage ;; *) - undeploy $1 ${@:2} + undeploy $1 $(echo ${@} | sed 's/^ *[^ ]* *//') ;; esac -- cgit 1.2.3-korg