diff options
author | Lucía Andrea Illanes Albornoz <lucia@luciaillanes.de> | 2023-02-22 04:54:39 +0100 |
---|---|---|
committer | Lucía Andrea Illanes Albornoz <lucia@luciaillanes.de> | 2023-02-22 04:54:39 +0100 |
commit | 989546be58842a9fb611fbd9ddfdb2d11cf466d3 (patch) | |
tree | 8fcc1918fe91281def4b079a303a2d36986e3561 | |
parent | a2d9a26f4cd7b4076c6be4a370f3c382a785e0c6 (diff) | |
download | midipix_build-989546be58842a9fb611fbd9ddfdb2d11cf466d3.tar.bz2 midipix_build-989546be58842a9fb611fbd9ddfdb2d11cf466d3.tar.xz |
Exit correctly on ^C and -V [..].
-rwxr-xr-x | build.sh | 3 | ||||
-rw-r--r-- | subr.rtl/rtl_log.subr | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -4,7 +4,6 @@ # {{{ buildp_ast($_param) buildp_ast() { - trap '' HUP INT TERM USR1 USR2; local _bpa_param="${1}" \ _bpa_cmd="" _bpa_pids="" _bpa_pids_new="" \ _bpa_pids_niter=0 _bpa_pkg_name=""; @@ -18,6 +17,8 @@ buildp_ast() { fi; done; + trap '' HUP INT TERM USR1 USR2; + if [ "${_bpa_param}" = "abort" ]; then rtl_log_msg "fatalexit" "${MSG_build_aborted}"; fi; diff --git a/subr.rtl/rtl_log.subr b/subr.rtl/rtl_log.subr index 89cfe4cb..57e2ebfd 100644 --- a/subr.rtl/rtl_log.subr +++ b/subr.rtl/rtl_log.subr @@ -82,7 +82,9 @@ rtl_log_msg() { _rlm3_tag="fatal"; _rlm3_exitfl=1; fi; - if rtl_lmatch \$RTLP_LOG_TAGS "${_rlm3_tag}" ","; then + if [ "${_rlm3_tag}" = "fatal" ]\ + || rtl_lmatch \$RTLP_LOG_TAGS "${_rlm3_tag}" ","; + then eval _rlm3_attr='${LOG_TAG_'"${_rlm3_tag}"':-}'; if [ "${#_rlm3_attr}" -eq 0 ]; then rtlp_log_printf "" "" "0;==> [4;41;97mFIXME TODO XXX UNKNOWN TAG \`${_rlm3_tag}' PASSED TO rtl_log_msg()[0m\n"; |