[COMMON] Fix condition bracket bashisms - step 1
[oom.git] / kubernetes / helm / plugins / undeploy / undeploy.sh
index e5c0c12..790f84f 100755 (executable)
@@ -23,13 +23,13 @@ undeploy() {
 
   array=($(helm ls -q --all | grep $RELEASE))
   n=${#array[*]}
-  for (( i = n-1; i >= 0; i-- ))
+  for i in $(seq $(($n-1)) -1 0)
   do
     helm del "${array[i]}" $FLAGS
   done
 }
 
-if [[ $# < 1 ]]; then
+if [ $# < 1 ]; then
   echo "Error: command 'undeploy' requires a release name"
   exit 0
 fi