diff --git a/functions/update_apps.sh b/functions/update_apps.sh index b5cf1632..6344be3b 100644 --- a/functions/update_apps.sh +++ b/functions/update_apps.sh @@ -7,7 +7,6 @@ mapfile -t array < <(cli -m csv -c 'app chart_release query name,update_availabl [[ -z $timeout ]] && echo -e "\nDefault Timeout: 500" && timeout=500 || echo -e "\nCustom Timeout: $timeout" [[ "$timeout" -le 120 ]] && echo "Warning: Your timeout is set low and may lead to premature rollbacks or skips" update_limit=2 -current_updates=0 it=0 while [[ $it -lt ${#array[@]} ]] @@ -16,15 +15,14 @@ do if [[ "$jobs" -ge "$update_limit" ]]; then sleep 3 else - update_apps "${array[$it]}" & + application="${array[$it]}" + update_apps "$application" & processes+=($!) ((it++)) fi done - - for proc in "${processes[@]}" do wait "$proc"