diff options
author | Mark Ferrell <major@homeonderanged.org> | 2014-06-26 14:25:28 -0700 |
---|---|---|
committer | Mark Ferrell <major@homeonderanged.org> | 2014-06-26 14:25:28 -0700 |
commit | 2a7453ec9d0eef6de5bdf8b2aa30351263e88738 (patch) | |
tree | 7efcfea308872e337f995845a84a9c8f13149e67 | |
parent | b1b7f89cf7a95c91c5cc0d9bd06f7449469e3fca (diff) |
Return with appropriate return code to avoid catching 'set -e'
-rwxr-xr-x | build | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -95,8 +95,10 @@ import() include() { set -- "${1}" "`echo "${1}" | tr '-' '_'`" - test -f "${BUILDER_CFGDIR}/${1}" || die "config not found '${1}'" - eval "test -z \"\${BUILDER_INCLUDE_${2}}\"" || return + if ! test -f "${BUILDER_CFGDIR}/${1}"; then + die "config not found '${1}'" + fi + eval "test -z \"\${BUILDER_INCLUDE_${2}}\"" || return 0 . "${BUILDER_CFGDIR}/${1}" eval "BUILDER_INCLUDE_${2}='${BUILDER_CFGDIR}/${1}'" if [ -z "${BUILDER_INCLUDED}" ]; then |