diff options
author | P. 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) |
commit | 01cd33a44eaf9f92d748a3b92ff3cd84e8b45454 (patch) | |
tree | d63204bd97dadb5c8a71d9eafc3e946ba9166668 /lib/deps.sh | |
parent | 714f7e1115e937f1f1bb0618aee358af86be0a78 (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/deps.sh')
-rw-r--r-- | lib/deps.sh | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/deps.sh b/lib/deps.sh index 3dc3460..1820940 100644 --- a/lib/deps.sh +++ b/lib/deps.sh @@ -49,7 +49,8 @@ ob_parse_dep() _obpd_host_arch="${OPTARG}" ;; ?) - return $(_ob_return 125) + _ob_return 125 + return ${?} ;; esac done @@ -62,7 +63,8 @@ ob_parse_dep() # Remove leading, trailing, and duplicate spaces. _obpd_dep="$(IFS=' ' echo ${_obpd_dep})" else - return $(_ob_return 125) + _ob_return 125 + return ${?} fi # <pkg>[:<archqual>] [(<rel> <ver>)] [\[<arches>\]] @@ -93,7 +95,8 @@ ob_parse_dep() eval ${_obpd_comp_var}=\"\$\{_obpd_${_obpd_comp}\}\" done - return $(_ob_return 0) + _ob_return 0 + return ${?} } ob_reduce_deps() @@ -112,7 +115,8 @@ ob_reduce_deps() _obrd_union=true ;; ?) - return $(_ob_return 125) + _ob_return 125 + return ${?} ;; esac done @@ -121,7 +125,8 @@ ob_reduce_deps() if [ "${#}" -eq 1 ]; then _obrd_deps="${1}" else - return $(_ob_return 125) + _ob_return 125 + return ${?} fi _obrd_orig_ifs="${IFS}" @@ -137,7 +142,8 @@ ob_reduce_deps() fi done - return $(_ob_return 0) + _ob_return 0 + return ${?} } _ob_dep_arch_is_concerned() @@ -164,5 +170,6 @@ _ob_dep_arch_is_concerned() fi done - return $(_ob_return ${_obdaic_seen_arch}) + _ob_return ${_obdaic_seen_arch} + return ${?} } |