wait
This commit is contained in:
parent
9079cf7a33
commit
1b89f90230
@ -12,6 +12,7 @@ count=0
|
|||||||
do
|
do
|
||||||
update_apps "$i" &
|
update_apps "$i" &
|
||||||
(( count++ ))
|
(( count++ ))
|
||||||
|
processes+=($!)
|
||||||
while [[ "$count" -ge "$update_limit" ]]
|
while [[ "$count" -ge "$update_limit" ]]
|
||||||
do
|
do
|
||||||
echo "waiting for free space"
|
echo "waiting for free space"
|
||||||
@ -19,6 +20,12 @@ count=0
|
|||||||
count=0
|
count=0
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for proc in "${processes[@]}"
|
||||||
|
do
|
||||||
|
wait "$proc"
|
||||||
|
done
|
||||||
|
|
||||||
}
|
}
|
||||||
export -f commander
|
export -f commander
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user