summaryrefslogtreecommitdiffstats
path: root/lib/control.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/control.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/control.sh')
-rw-r--r--lib/control.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/control.sh b/lib/control.sh
index 99bf2c5..5286a88 100644
--- a/lib/control.sh
+++ b/lib/control.sh
@@ -39,7 +39,8 @@ ob_parse_control()
_obpco_req_fields="${3}"
_obpco_opt_fields="${4}"
else
- return $(_ob_return 125)
+ _ob_return 125
+ return ${?}
fi
_obpco_all_fields=" ${_obpco_req_fields} ${_obpco_opt_fields} "
@@ -85,7 +86,8 @@ ob_parse_control()
OB_CONTROL_VALUE="${_obpco_value}"
"${_obpco_field_cb}"
if [ ${?} -ne 0 ]; then
- return $(_ob_return 0)
+ _ob_return 0
+ return ${?}
fi
else
# Continuation line.
@@ -111,7 +113,8 @@ ${_line# }"
"${_obpco_req_fields}"
fi
- return $(_ob_return 0)
+ _ob_return 0
+ return ${?}
}
_ob_parse_control_error()
@@ -138,5 +141,6 @@ _ob_parse_control_error()
ob_set_text_domain "${_obpcoe_orig_text_domain}"
- return $(_ob_return 0)
+ _ob_return 0
+ return ${?}
}