aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Ferrell <major@homeonderanged.org>2014-06-26 14:25:28 -0700
committerMark Ferrell <major@homeonderanged.org>2014-06-26 14:25:28 -0700
commit2a7453ec9d0eef6de5bdf8b2aa30351263e88738 (patch)
tree7efcfea308872e337f995845a84a9c8f13149e67
parentb1b7f89cf7a95c91c5cc0d9bd06f7449469e3fca (diff)
Return with appropriate return code to avoid catching 'set -e'
-rwxr-xr-xbuild6
1 files changed, 4 insertions, 2 deletions
diff --git a/build b/build
index a990d33..8a26e10 100755
--- a/build
+++ b/build
@@ -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