diff --git a/functions/update_apps.sh b/functions/update_apps.sh index efb9d9a3..94f525ec 100644 --- a/functions/update_apps.sh +++ b/functions/update_apps.sh @@ -27,12 +27,10 @@ do update_apps "${array[$it]}" & processes+=($!) ((it++)) - else - for proc in "${processes[@]}" - do - wait "$proc" - done + elif [[ ${#processes[@]} == 0 ]]; then break + else + sleep 3 fi done rm temp.txt