From 8ff5886a9990e4779a4ae89001463349c7c68221 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Wed, 27 Jul 2022 13:16:11 -0600 Subject: [PATCH] test --- functions/update_apps.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/functions/update_apps.sh b/functions/update_apps.sh index f8efb24d..2522c2c1 100644 --- a/functions/update_apps.sh +++ b/functions/update_apps.sh @@ -11,7 +11,7 @@ echo "------------------------" echo "Asynchronous Updates: $update_limit" it=0 -while [[ $it -lt ${#array[@]} ]] +while true do status=$(cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,status') proc_count=${#processes[@]} @@ -20,7 +20,9 @@ do do kill -0 "$proc" &> /dev/null || { unset "processes[$count]"; ((proc_count--)); } 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 else update_apps "${array[$it]}" &