From 01cd33a44eaf9f92d748a3b92ff3cd84e8b45454 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 09 Sep 2012 17:10:13 -0400 Subject: 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. --- (limited to 'lib/changelog.sh') 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 ${?} } -- cgit v0.9.1