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/changelog.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/changelog.sh')
-rw-r--r-- | lib/changelog.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/changelog.sh b/lib/changelog.sh index dc9ace2..6fcf79e 100644 --- a/lib/changelog.sh +++ b/lib/changelog.sh @@ -53,7 +53,8 @@ oh_parse_changelog() _obpch_file="${1}" _obpch_entry_cb="${2}" else - return $(_ob_return 125) + _ob_return 125 + return ${?} fi # Parsing logic based on that of dpkg. @@ -140,7 +141,8 @@ ${_obpch_line}" _obpch_entries=$(($_obpch_entries + 1)) "${_obpch_entry_cb}" if [ ${?} -ne 0 ]; then - return $(_ob_return ${_obpch_entries}) + _ob_return ${_obpch_entries} + return ${?} fi fi _obpch_expect=next_or_eof @@ -172,7 +174,8 @@ ${_obpch_blank_lines}${_obpch_line}" "$(_ob_get_changelog_expect_str "${_obpch_expect}")" fi - return $(_ob_return ${_obpch_entries}) + _ob_return ${_obpch_entries} + return ${?} } _ob_parse_changelog_error() @@ -195,7 +198,8 @@ _ob_parse_changelog_error() ob_set_text_domain "${_obpche_orig_text_domain}" - return $(_ob_return 0) + _ob_return 0 + return ${?} } _ob_get_changelog_expect_str() @@ -209,5 +213,6 @@ _ob_get_changelog_expect_str() ob_set_text_domain "${_obgces_orig_text_domain}" - return $(_ob_return 0) + _ob_return 0 + return ${?} } |