summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/control.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/control.sh b/lib/control.sh
index 3395294..ab37ef3 100644
--- a/lib/control.sh
+++ b/lib/control.sh
@@ -201,7 +201,7 @@ ob_set_substvar()
)"
# Trim leading and trailing whitespace from value.
- value="$(echo "${value}" | sed -n '
+ 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,
@@ -209,7 +209,10 @@ ob_set_substvar()
s/[\n]*$//; # remove trailing newline characters, and
p; # print the results.
};
- ')"
+ ' <<-EOF
+ ${value}
+ EOF
+ )"
eval "_OB_SUBSTVAR_${name}=\"\${value}\""