This commit is contained in:
Heavybullets8 2022-08-10 22:14:30 -06:00
parent b012416a07
commit 06bb4e569f

View File

@ -57,7 +57,6 @@ echo "Asynchronous Updates: $update_limit"
# echo
# echo
final_check=0
it=0
while true
do
@ -78,18 +77,17 @@ do
if [[ "$proc_count" -ge "$update_limit" ]]; then
sleep 3
elif [[ $it -lt ${#array[@]} ]]; then
# loop=0
# until [[ "$loop" -ge 2 || $it -ge ${#array[@]} ]];
# do
loop=0
until [[ "$loop" -ge 2 || $it -ge ${#array[@]} ]];
do
update_apps "${array[$it]}" &
processes+=($!)
((loop++))
((it++))
# done
done
elif [[ $proc_count != 0 ]]; then # Wait for all processes to finish
sleep 3
else # All processes must be completed, break out of loop
[[ $final_check == 0 ]] && ((final_check++)) && continue
break
fi
done