diff options
-rw-r--r-- | lib/load.sh | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/load.sh b/lib/load.sh index 03438c1..f22e128 100644 --- a/lib/load.sh +++ b/lib/load.sh @@ -20,25 +20,26 @@ [ -n "${_OB_LOAD_SM}" ] && return 0 _OB_LOAD_SM='true' +# The "common" module is used by this and all other modules. +# We have to manually load the "common" module so we can use it in ob_use. +. '@@LIBOPKBUILD@@/common.sm' + ob_use() { - _obu_module= + _ob_local _obu_module if [ "${#}" -eq 1 ]; then _obu_module="${1}" else - unset _obu_module - return 125 + return $(_ob_return 125) fi _obu_module='@@LIBOPKBUILD@@'"/${_obu_module}.sm" if [ -r "${_obu_module}" ]; then . "${_obu_module}" else - unset _obu_module - return 1 + return $(_ob_return 1) fi - unset _obu_module - return 0 + return $(_ob_return 0) } |