summaryrefslogtreecommitdiffstats
path: root/lib/load.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-09-09 17:10:13 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-09-09 17:10:13 (EDT)
commit01cd33a44eaf9f92d748a3b92ff3cd84e8b45454 (patch)
treed63204bd97dadb5c8a71d9eafc3e946ba9166668 /lib/load.sh
parent714f7e1115e937f1f1bb0618aee358af86be0a78 (diff)
Return rather than print value in _ob_return.
Don't use _ob_return in command substitutions. Doing so unsets stack variables only in a subshell environment.
Diffstat (limited to 'lib/load.sh')
-rw-r--r--lib/load.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/load.sh b/lib/load.sh
index f22e128..ee32e9b 100644
--- a/lib/load.sh
+++ b/lib/load.sh
@@ -31,15 +31,18 @@ ob_use()
if [ "${#}" -eq 1 ]; then
_obu_module="${1}"
else
- return $(_ob_return 125)
+ _ob_return 125
+ return ${?}
fi
_obu_module='@@LIBOPKBUILD@@'"/${_obu_module}.sm"
if [ -r "${_obu_module}" ]; then
. "${_obu_module}"
else
- return $(_ob_return 1)
+ _ob_return 1
+ return ${?}
fi
- return $(_ob_return 0)
+ _ob_return 0
+ return ${?}
}