From 36002c59fbf75f821a4c755b01578faa04000fc8 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Wed, 10 Aug 2022 20:36:24 -0600 Subject: [PATCH] once last check prior to exiting script --- functions/update_apps.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions/update_apps.sh b/functions/update_apps.sh index 2403ff2e..d2a917ad 100644 --- a/functions/update_apps.sh +++ b/functions/update_apps.sh @@ -15,6 +15,7 @@ while_status=$(cli -m csv -c 'app chart_release query name,update_available,huma echo "$while_status" > temp.txt rm trigger &>/dev/null delay=2 +final_check=0 while true do if [[ -f trigger ]]; then @@ -44,9 +45,10 @@ do ((it++)) ((proc_count++)) done - elif [[ ${#processes[@]} != 0 ]]; then # Wait for all processes to finish + elif [[ $proc_count != 0 ]]; then # Wait for all processes to finish sleep $delay else # All processes must be completed, break out of loop + [[ $final_check == 0 ]] && ((final_check++)) && continue break fi done