diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-04-09 21:12:20 +0100 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-04-09 21:12:20 +0100 |
commit | 0a3032f236e906eb6da783ccc3e7361bc3d9eeb6 (patch) | |
tree | d192989db191da74dcff8f8eca3ee0d8823eab77 /subr | |
parent | 73f6c6b8ee4713e740a9862787582a2388ebc245 (diff) | |
download | midipix_build-0a3032f236e906eb6da783ccc3e7361bc3d9eeb6.tar.bz2 midipix_build-0a3032f236e906eb6da783ccc3e7361bc3d9eeb6.tar.xz |
subr/build_init.subr:buildp_init_files(): trap SIG{HUP,INT,TERM,USR[12]} during prefix cleaning, if requested.
Diffstat (limited to 'subr')
-rw-r--r-- | subr/build_init.subr | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/subr/build_init.subr b/subr/build_init.subr index 33c51e34..8278a6d3 100644 --- a/subr/build_init.subr +++ b/subr/build_init.subr @@ -126,12 +126,14 @@ buildp_init_files() { fi; rtl_fileop touch "${DEFAULT_BUILD_LOG_FNAME}"; rtl_log_set_fname "${DEFAULT_BUILD_LOG_FNAME}"; if rtl_lmatch "${ARG_CLEAN_BUILDS}" "prefix" ","; then + trap "rm -f \"${DEFAULT_BUILD_STATUS_IN_PROGRESS_FNAME}\" 2>/dev/null; rtl_log_msg fatalexit \"Build aborted.\"" HUP INT TERM USR1 USR2; rtl_log_msg info "-C prefix specified, cleaning prefix..."; for _pname in ${DEFAULT_CLEAR_PREFIX_PATHS}; do if ! rtl_fileop rm "${PREFIX}/${_pname}"; then _rc=1; _status="Error: failed to remove \`${PREFIX}/${_pname}'."; break; fi; done; + trap - EXIT HUP INT TERM USR1 USR2; fi; export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; fi; |