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 more array bashisms
[oom.git]
/
kubernetes
/
helm
/
plugins
/
undeploy
/
undeploy.sh
diff --git
a/kubernetes/helm/plugins/undeploy/undeploy.sh
b/kubernetes/helm/plugins/undeploy/undeploy.sh
index
a3b0e3c
..
dca4499
100755
(executable)
--- a/
kubernetes/helm/plugins/undeploy/undeploy.sh
+++ b/
kubernetes/helm/plugins/undeploy/undeploy.sh
@@
-1,4
+1,4
@@
-#!/bin/
ba
sh
+#!/bin/sh
usage() {
cat << EOF
usage() {
cat << EOF
@@
-21,11
+21,14
@@
undeploy() {
RELEASE=$1
FLAGS=$2
RELEASE=$1
FLAGS=$2
- array=($(helm ls -q --all | grep $RELEASE))
- n=${#array[*]}
- for i in $(seq $(($n-1)) -1 0)
+ reverse_list=
+ for item in $(helm ls -q --all | grep $RELEASE)
do
do
- helm del "${array[i]}" $FLAGS
+ reverse_list="$item $reverse_list"
+ done
+ for item in $reverse_list
+ do
+ helm del $item $FLAGS
done
}
done
}