diff options
author | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-12-03 21:04:55 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-12-03 21:04:55 +0000 |
commit | bb98b3a3c74344d58af1b311e5fb515dfa6ced61 (patch) | |
tree | 34bf1b20e96cd99c7036503f62467bd551b65429 | |
parent | 920f043701fa01cb603cc27c7e00617631df8474 (diff) | |
download | midipix_build-bb98b3a3c74344d58af1b311e5fb515dfa6ced61.tar.bz2 midipix_build-bb98b3a3c74344d58af1b311e5fb515dfa6ced61.tar.xz |
subr/ex_rtl.subr:-ex_rtl_try_run(): remove explicit exit & respect set -o errexit constraints.
-rw-r--r-- | subr/ex_rtl.subr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/subr/ex_rtl.subr b/subr/ex_rtl.subr index cd9d1bee..ecca3c80 100644 --- a/subr/ex_rtl.subr +++ b/subr/ex_rtl.subr @@ -10,7 +10,7 @@ ex_rtl_dirname() { echo "${1%/*}"; }; ex_rtl_get_var_unsafe() { eval echo \${${1}}; }; ex_rtl_pop_IFS() { IFS="${EXP_RTL_IFS}"; }; ex_rtl_push_IFS() { EXP_RTL_IFS="${IFS}"; IFS="${1}"; }; -ex_rtl_try_run() { ex_rtl_test_cmd "${1}" && { "${@}" || exit ${?}; }; }; +ex_rtl_try_run() { if ex_rtl_test_cmd "${1}"; then "${@}"; fi; }; ex_rtl_set_var_unsafe() { [ -n "${2}" ] && eval ${1}=\"${2}\" || return 0; }; ex_rtl_test_cmd() { command -v "${1}" >/dev/null; }; ex_rtl_toupper() { echo "${1}" | tr a-z A-Z; }; |