diff options
author | Fiachra Corcoran <fiachra.corcoran@est.tech> | 2022-05-17 08:25:37 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2022-05-17 08:25:37 +0000 |
commit | 0ed8a25190a34f5b5ac7d1702ca79165b8628375 (patch) | |
tree | 9347dfc76d52e50636e1981c06f60ddc5b91080a /kubernetes/helm/plugins/deploy/deploy.sh | |
parent | 8ca75d9434288173933f6e140c829c42f7a3c5b5 (diff) | |
parent | e9f5a90e0c7ce23061308e1a0614de2bc83a1aea (diff) |
Merge "[COMMON] Fix more and more array bashisms step 2"
Diffstat (limited to 'kubernetes/helm/plugins/deploy/deploy.sh')
-rwxr-xr-x | kubernetes/helm/plugins/deploy/deploy.sh | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/kubernetes/helm/plugins/deploy/deploy.sh b/kubernetes/helm/plugins/deploy/deploy.sh index a8d134ba92..347c7689e4 100755 --- a/kubernetes/helm/plugins/deploy/deploy.sh +++ b/kubernetes/helm/plugins/deploy/deploy.sh @@ -70,21 +70,21 @@ generate_overrides() { resolve_deploy_flags() { - flags=($1) - n=${#flags[*]} - i=0 ; while [ "$i" -lt "$n" ]; do - PARAM=${flags[i]} - if [ "$PARAM" = "-f" ] || \ - [ "$PARAM" = "--values" ] || \ - [ "$PARAM" = "--set" ] || \ - [ "$PARAM" = "--set-string" ] || \ - [ "$PARAM" = "--version" ]; then - # skip param and its value - i=$((i + 1)) + skip="false" + for param in $1; do + if [ "$skip" = "false" ]; then + if [ "$param" = "-f" ] || \ + [ "$param" = "--values" ] || \ + [ "$param" = "--set" ] || \ + [ "$param" = "--set-string" ] || \ + [ "$param" = "--version" ]; then + skip="true" + else + DEPLOY_FLAGS="$DEPLOY_FLAGS $param" + fi else - DEPLOY_FLAGS="$DEPLOY_FLAGS $PARAM" + skip="false" fi - i=$((i+1)) done echo "$DEPLOY_FLAGS" } |