summaryrefslogtreecommitdiffstats
path: root/lib/control.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/control.sh')
-rw-r--r--lib/control.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/control.sh b/lib/control.sh
index 35913aa..76ba516 100644
--- a/lib/control.sh
+++ b/lib/control.sh
@@ -245,8 +245,7 @@ ob_set_binary_substvar()
value="$(printf '%s' "${value}" | sed -n "${_OB_SUBSTVAR_TRIM_SED}")"
# Convert package name to clean form.
- package="$(printf '%s' "${package}" | tr 'A-Z' 'a-z' | \
- tr -C 'a-z0-9' '_')"
+ package="$(ob_clean_name "${package}")"
# TODO: Maybe disallow variable names beginning with hyphens, and/or
# otherwise make this safer.
@@ -326,8 +325,7 @@ ob_substvars()
# Perform the substitution.
name_tr="$(printf '%s' "${name}" | tr 'A-Z-' 'a-z_')"
- package="$(printf '%s' "${package}" | tr 'A-Z' 'a-z' | \
- tr -C 'a-z0-9' '_')"
+ package="$(ob_clean_name "${package}")"
if eval "[ x\"\${_ob_substvar_src_${name_tr}:+set}\" = x'set' ]"
then
name_tr="_ob_substvar_src_${name_tr}"