Code Review
/
oom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
[COMMON] Fix arithmetic loop bashisms
[oom.git]
/
kubernetes
/
helm
/
plugins
/
deploy
/
deploy.sh
diff --git
a/kubernetes/helm/plugins/deploy/deploy.sh
b/kubernetes/helm/plugins/deploy/deploy.sh
index
44e8e56
..
0d434ad
100755
(executable)
--- a/
kubernetes/helm/plugins/deploy/deploy.sh
+++ b/
kubernetes/helm/plugins/deploy/deploy.sh
@@
-70,7
+70,7
@@
generate_overrides() {
resolve_deploy_flags() {
flags=($1)
n=${#flags[*]}
resolve_deploy_flags() {
flags=($1)
n=${#flags[*]}
-
for (( i = 0; i < n; i++ ))
; do
+
i=0 ; while [ "$i" -lt "$n" ]
; do
PARAM=${flags[i]}
if [[ $PARAM = "-f" || \
$PARAM = "--values" || \
PARAM=${flags[i]}
if [[ $PARAM = "-f" || \
$PARAM = "--values" || \
@@
-82,6
+82,7
@@
resolve_deploy_flags() {
else
DEPLOY_FLAGS="$DEPLOY_FLAGS $PARAM"
fi
else
DEPLOY_FLAGS="$DEPLOY_FLAGS $PARAM"
fi
+ i=$((i+1))
done
echo "$DEPLOY_FLAGS"
}
done
echo "$DEPLOY_FLAGS"
}
@@
-255,7
+256,7
@@
deploy() {
else
array=($(echo "$ALL_HELM_RELEASES" | grep "${RELEASE}-${subchart}"))
n=${#array[*]}
else
array=($(echo "$ALL_HELM_RELEASES" | grep "${RELEASE}-${subchart}"))
n=${#array[*]}
- for
(( i = n-1; i >= 0; i-- )
); do
+ for
i in $(seq $(($n-1)) -1 0
); do
if [[ $HELM_VER = "v3."* ]]; then
helm del "${array[i]}"
else
if [[ $HELM_VER = "v3."* ]]; then
helm del "${array[i]}"
else