diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2021-05-11 13:41:43 +0100 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2021-05-11 13:41:43 +0100 |
commit | ea574f1ec4acf56fe9b2d7dc748082b59f1c063f (patch) | |
tree | e5073a42d072fc04ff3b800c689bf805f218a5b5 | |
parent | be9260753e54d9b36f32685b1ca21052d76e52a8 (diff) | |
download | midipix_build-ea574f1ec4acf56fe9b2d7dc748082b59f1c063f.tar.bz2 midipix_build-ea574f1ec4acf56fe9b2d7dc748082b59f1c063f.tar.xz |
subr/ex_pkg_restart.subr:exp_pkg_expand_restart_spec(): fix variable name.
subr/ex_pkg_restart.subr:ex_pkg_process_restart_spec(): don't process empty ${${_epprs_rspec}}.
-rw-r--r-- | subr/ex_pkg_restart.subr | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/subr/ex_pkg_restart.subr b/subr/ex_pkg_restart.subr index 52645210..6f9bfe98 100644 --- a/subr/ex_pkg_restart.subr +++ b/subr/ex_pkg_restart.subr @@ -200,7 +200,7 @@ exp_pkg_expand_restart_spec() { eval _epers_spec='${'"${_epers_rspec}"'}'; case "${_epers_spec}" in - "") eval ${_eppras_rspec_at}=; ;; + "") eval ${_epers_rspec_at}=; ;; ALL) eval ${_epers_rspec_at}=ALL; ;; LAST|LAST:*) case "${_epers_spec}" in @@ -259,32 +259,34 @@ ex_pkg_process_restart_spec() { _epprs_at="" _epprs_rc=0 _epprs_spec_at_new="" _epprs_step="" _epprs_step1="" \ _epprs_virtual_set=""; _status=""; - if exp_pkg_init_restart_at_virtual \$_epprs_virtual_set \ - && exp_pkg_expand_restart_spec "${_epprs_rspec}" \$_epprs_spec_at_new \ - && 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}=; - 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; + if eval [ '"${'"${_epprs_rspec}"':+1}"' = 1 ]; then + if exp_pkg_init_restart_at_virtual \$_epprs_virtual_set \ + && exp_pkg_expand_restart_spec "${_epprs_rspec}" \$_epprs_spec_at_new \ + && 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}=; + 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; + rtl_sunset \$_epprs_virtual_set; fi; - rtl_sunset \$_epprs_virtual_set; return "${_epprs_rc}"; }; |