summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/control.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/control.sh b/lib/control.sh
index 7a85715..7f39ecd 100644
--- a/lib/control.sh
+++ b/lib/control.sh
@@ -271,6 +271,7 @@ ob_substvars()
local name=
local rhs=
local old_rhs=
+ local name_tr=
local value=
check_bin=false
@@ -319,19 +320,19 @@ ob_substvars()
esac
# Perform the substitution.
- name="$(printf '%s' "${name}" | tr 'a-z-' 'A-Z_')"
- if eval "[ x\"\${_OB_SUBSTVAR_SRC_${name}:+set}\" = x'set' ]"
+ name_tr="$(printf '%s' "${name}" | tr 'a-z-' 'A-Z_')"
+ if eval "[ x\"\${_OB_SUBSTVAR_SRC_${name_tr}:+set}\" = x'set' ]"
then
- name="_OB_SUBSTVAR_SRC_${name}"
+ name_tr="_OB_SUBSTVAR_SRC_${name_tr}"
elif ${check_bin} && eval "[ x\"\${_OB_SUBSTVAR_BIN_$(: \
- )${package}__${name}:+set}\" = x'set' ]"; then
- name="_OB_SUBSTVAR_BIN_${package}__${name}"
+ )${package}__${name_tr}:+set}\" = x'set' ]"; then
+ name_tr="_OB_SUBSTVAR_BIN_${package}__${name_tr}"
else
_ob_warn_msg 'substvar_unknown' "${name}"
string="${lhs}${rhs}"
continue
fi
- value="$(eval "printf '%s' \"\${${name}}\"")"
+ value="$(eval "printf '%s' \"\${${name_tr}}\"")"
string="${lhs}${value}${rhs}"
depth=$((${depth} + 1))
done