revamp
This commit is contained in:
parent
4fe1589aef
commit
9000d47a18
@ -13,12 +13,14 @@ count=0
|
|||||||
update_apps "$i" &
|
update_apps "$i" &
|
||||||
processes+=($!)
|
processes+=($!)
|
||||||
proc_count=0
|
proc_count=0
|
||||||
|
count=$(jobs -p | wc -l)
|
||||||
while [[ "${#processes[@]}" -ge "$update_limit" ]]
|
while [[ "${#processes[@]}" -ge "$update_limit" ]]
|
||||||
do
|
do
|
||||||
echo "waiting for free space"
|
for proc in "${processes[@]}"
|
||||||
wait -n "${processes[$proc_count]}" &> /dev/null
|
do
|
||||||
(( proc_count++ ))
|
kill -0 "$proc" || unset "processes[$proc_count]"
|
||||||
unset "processes[$proc_count]"
|
(( proc_count++ ))
|
||||||
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user