This commit is contained in:
Heavybullets8 2022-07-27 13:16:11 -06:00
parent 6dc96419f4
commit 8ff5886a99

View File

@ -11,7 +11,7 @@ echo "------------------------"
echo "Asynchronous Updates: $update_limit" echo "Asynchronous Updates: $update_limit"
it=0 it=0
while [[ $it -lt ${#array[@]} ]] while true
do do
status=$(cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,status') status=$(cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,status')
proc_count=${#processes[@]} proc_count=${#processes[@]}
@ -20,7 +20,9 @@ do
do do
kill -0 "$proc" &> /dev/null || { unset "processes[$count]"; ((proc_count--)); } kill -0 "$proc" &> /dev/null || { unset "processes[$count]"; ((proc_count--)); }
done done
if [[ "$proc_count" -ge "$update_limit" ]]; then if [[ $it -eq ${#array[@]} && ${#processes[@]} == 0 ]]; then
break
elif [[ "$proc_count" -ge "$update_limit" ]]; then
sleep 3 sleep 3
else else
update_apps "${array[$it]}" & update_apps "${array[$it]}" &