summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-03-25 22:35:37 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-03-25 22:35:37 -0700
commitc7f0980287d4110f8b9f483e105e83c5d8f48c73 (patch)
tree1e40090aca59732054596b6cd9d4f4ebbf3d8def /configure
parentc8e900e93eec18331e861b4e2babb4f2ac1ee519 (diff)
downloadtxr-c7f0980287d4110f8b9f483e105e83c5d8f48c73.tar.gz
txr-c7f0980287d4110f8b9f483e105e83c5d8f48c73.tar.bz2
txr-c7f0980287d4110f8b9f483e105e83c5d8f48c73.zip
configure: allow variables to contain quotes.
* configure: When generating the assignment that stores the value of the command line variable into the corresponding shell variable, interpolate $val between single quotes in such a way that single quotes occurring in $val are replaced by the pattern '\''. Thus, variables may contain any character whatsoever.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure b/configure
index cc6d44a8..250cb772 100755
--- a/configure
+++ b/configure
@@ -225,7 +225,7 @@ while [ $# -gt 0 ] ; do
exit 1
fi
- eval "$var='$val'"
+ eval "$var='$(printf "%s" "$val" | sed -e "s/'/'\\\\''/g")'"
eval "var_given_exists=\${${var}_given+y}"