diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2014-10-02 15:23:22 +0400 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2014-10-02 15:23:22 +0400 |
commit | b07bc89f47c39cff31ad2168c80d32e98f698a10 (patch) | |
tree | e7345256ab66d2ba57906d1a38b943054f2c1150 | |
parent | e3f600ba4e42fc405e27f357f1c6c266dd2c5931 (diff) |
pkgupdate.sh: wait for job completion
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
-rwxr-xr-x | pkgupdate.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgupdate.sh b/pkgupdate.sh index e323316..3b8ee36 100755 --- a/pkgupdate.sh +++ b/pkgupdate.sh @@ -298,7 +298,7 @@ rsync_files() { run_jobs() { local targets=$(fetch_remote_targets) - local target slot count + local target slot count job #echo "* Compiling packages" @@ -321,6 +321,11 @@ run_jobs() { fi done ) & done + + for job in $(jobs -p); do + wait "$job" + echo "* Job $job completed" + done } trap terminate INT TERM |