From c7f0980287d4110f8b9f483e105e83c5d8f48c73 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 25 Mar 2020 22:35:37 -0700 Subject: 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. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') 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}" -- cgit v1.2.3