summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-05-11 00:40:56 +0100
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-05-11 00:40:56 +0100
commitbe9260753e54d9b36f32685b1ca21052d76e52a8 (patch)
tree813a6a06dd23fe763e8551b6ddd4b8f5653cd7ec /subr
parent3e5303fb9ba19addfcb672c1f3aa78d02efb7ebc (diff)
downloadmidipix_build-be9260753e54d9b36f32685b1ca21052d76e52a8.tar.bz2
midipix_build-be9260753e54d9b36f32685b1ca21052d76e52a8.tar.xz
subr/ex_pkg_restart.subr:ex_pkg_process_restart_spec(): correctly handle {ALL,LAST} build steps.
Diffstat (limited to 'subr')
-rw-r--r--subr/ex_pkg_restart.subr29
1 files changed, 17 insertions, 12 deletions
diff --git a/subr/ex_pkg_restart.subr b/subr/ex_pkg_restart.subr
index 20e35b63..52645210 100644
--- a/subr/ex_pkg_restart.subr
+++ b/subr/ex_pkg_restart.subr
@@ -264,18 +264,23 @@ ex_pkg_process_restart_spec() {
&& exp_pkg_expand_restart_recursive "${_epprs_rspec}" "${_epprs_rrecursive}" \
&& exp_pkg_expand_restart_at_spec \$_epprs_virtual_set \$_epprs_spec_at_new; then
eval ${_epprs_rspec_at}=;
- for _epprs_at in ${DEFAULT_BUILD_STEPS}; do
- if rtl_lmatch "${_epprs_at}" "${_epprs_spec_at_new}" ","; then
- eval ${_epprs_rspec_at}='${'"${_epprs_rspec_at}"':+${'"${_epprs_rspec_at}"'},}${_epprs_at}';
- fi;
- done;
- if eval [ '"${'"${_epprs_rspec_at}"'##*,}"' != "finish" ]; then
- rtl_lfilter2 "${_epprs_rspec_at}" \$_epprs_step "clean,finish" ","; _epprs_step="${_epprs_step##*,}";
- rtl_lfilter2 \$DEFAULT_BUILD_STEPS \$_epprs_step1 "clean finish"; _epprs_step1="${_epprs_step1##* }";
- if [ "${_epprs_step}" = "${_epprs_step1}" ]; then
- eval ${_epprs_rspec_at}='${'"${_epprs_rspec_at}"':+${'"${_epprs_rspec_at}"'},}finish';
- fi;
- fi;
+ case "${_epprs_spec_at_new}" in
+ ALL|LAST)
+ eval ${_epprs_rspec_at}='${_epprs_spec_at_new}'; ;;
+ *)
+ for _epprs_at in ${DEFAULT_BUILD_STEPS}; do
+ if rtl_lmatch "${_epprs_at}" "${_epprs_spec_at_new}" ","; then
+ eval ${_epprs_rspec_at}='${'"${_epprs_rspec_at}"':+${'"${_epprs_rspec_at}"'},}${_epprs_at}';
+ fi;
+ done;
+ if eval [ '"${'"${_epprs_rspec_at}"'##*,}"' != "finish" ]; then
+ rtl_lfilter2 "${_epprs_rspec_at}" \$_epprs_step "clean,finish" ","; _epprs_step="${_epprs_step##*,}";
+ rtl_lfilter2 \$DEFAULT_BUILD_STEPS \$_epprs_step1 "clean finish"; _epprs_step1="${_epprs_step1##* }";
+ if [ "${_epprs_step}" = "${_epprs_step1}" ]; then
+ eval ${_epprs_rspec_at}='${'"${_epprs_rspec_at}"':+${'"${_epprs_rspec_at}"'},}finish';
+ fi;
+ fi; ;;
+ esac;
else
_epprs_rc=1;
fi;