summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-12-06 23:31:32 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-12-06 23:31:32 +0000
commita68f6b8e76850a622d42695ef1346572f0247514 (patch)
treecd4ac6040b972eb684916bda50a54f47e8bb7645
parent0b72c88d9b07c93a7e91f7fcc1671f0f1d151306 (diff)
downloadmidipix_build-a68f6b8e76850a622d42695ef1346572f0247514.tar.bz2
midipix_build-a68f6b8e76850a622d42695ef1346572f0247514.tar.xz
subr/ex_pkg_dispatch.subr:ex_pkg_dispatch(): don't launch new jobs if at least one package failed.
-rw-r--r--subr/ex_pkg_dispatch.subr22
1 files changed, 12 insertions, 10 deletions
diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr
index 771b2afe..fea64c8b 100644
--- a/subr/ex_pkg_dispatch.subr
+++ b/subr/ex_pkg_dispatch.subr
@@ -71,16 +71,18 @@ ex_pkg_dispatch() {
case "${_pipe_msg%% *}" in
done) "${_dispatch_fn}" finish_pkg ${_pipe_msg#done };
: $((_njobs-=1));
- for _njob in $(seq 1 $((${_njobs_max}-${_njobs}))); do
- if [ ${#} -eq 0 ]; then
- break;
- else
- exp_pkg_dispatch "${1}" "${_tgt_name}" \
- "${_restart_at}" "${_dispatch_fn}" \
- "${_stderrout_path}" "${_pipe_path}" \
- _njobs; shift;
- fi;
- done;
+ if [ "${_script_rc:-0}" -eq 0 ]; then
+ for _njob in $(seq 1 $((${_njobs_max}-${_njobs}))); do
+ if [ ${#} -eq 0 ]; then
+ break;
+ else
+ exp_pkg_dispatch "${1}" "${_tgt_name}" \
+ "${_restart_at}" "${_dispatch_fn}" \
+ "${_stderrout_path}" "${_pipe_path}" \
+ _njobs; shift;
+ fi;
+ done;
+ fi;
if [ "${_njobs:-0}" -eq 0 ]; then
break;
fi; ;;