summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/control.sh12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/control.sh b/lib/control.sh
index b5cc5d6..cd982e9 100644
--- a/lib/control.sh
+++ b/lib/control.sh
@@ -197,13 +197,10 @@ ob_set_source_substvar()
case "${name}" in *[!A-Za-z0-9-]* | '')
return 1
esac
- name="$(tr 'a-z-' 'A-Z_' <<-EOF
- ${name}
- EOF
- )"
+ name="$(printf '%s' "${name}" | tr 'a-z-' 'A-Z_')"
# Trim leading and trailing whitespace from value.
- value="$(sed -n '
+ value="$(printf '%s' "${value}" | sed -n '
H; # Store each input line in the hold space.
${ # At the last line of input:
g; # restore the hold space into the pattern space,
@@ -211,10 +208,7 @@ ob_set_source_substvar()
s/[\n]*$//; # remove trailing newline characters, and
p; # print the results.
};
- ' <<-EOF
- ${value}
- EOF
- )"
+ ')"
eval "_OB_SUBSTVAR_${name}=\"\${value}\""