[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 7/8] configure: quote command line arguments in config.status
From: |
Paolo Bonzini |
Subject: |
[PATCH 7/8] configure: quote command line arguments in config.status |
Date: |
Thu, 7 Jan 2021 15:00:38 +0100 |
Make config.status generation a bit more robust. (The quote_sh
function will also be reused to parse configure's command line
arguments in an external script driven by Meson build option
introspection).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index d573058b16..41866cc38e 100755
--- a/configure
+++ b/configure
@@ -89,6 +89,10 @@ printf " '%s'" "$0" "$@" >> config.log
echo >> config.log
echo "#" >> config.log
+quote_sh() {
+ printf "%s" "$1" | sed "s,','\\\\'',g; s,.*,'&',"
+}
+
print_error() {
(echo
echo "ERROR: $1"
@@ -6509,7 +6513,7 @@ preserve_env WINDRES
printf "exec" >>config.status
for i in "$0" "$@"; do
- test "$i" = --skip-meson || printf " '%s'" "$i" >>config.status
+ test "$i" = --skip-meson || printf " %s" "$(quote_sh "$i")" >>config.status
done
echo ' "$@"' >>config.status
chmod +x config.status
--
2.29.2
- [PATCH 5/8] configure: move GTK+ detection to Meson, (continued)
- [PATCH 5/8] configure: move GTK+ detection to Meson, Paolo Bonzini, 2021/01/07
- [PATCH 4/8] configure: move X11 detection to Meson, Paolo Bonzini, 2021/01/07
- [PATCH 8/8] configure: automatically parse command line for meson -D options, Paolo Bonzini, 2021/01/07
- Re: [PATCH 8/8] configure: automatically parse command line for meson -D options, Daniel P . Berrangé, 2021/01/13
- Re: [PATCH 8/8] configure: automatically parse command line for meson -D options, Paolo Bonzini, 2021/01/13
- Re: [PATCH 8/8] configure: automatically parse command line for meson -D options, Paolo Bonzini, 2021/01/13
- Re: [PATCH 8/8] configure: automatically parse command line for meson -D options, Yonggang Luo, 2021/01/22
- Re: [PATCH 8/8] configure: automatically parse command line for meson -D options, Paolo Bonzini, 2021/01/22
- Re: [PATCH 8/8] configure: automatically parse command line for meson -D options, Yonggang Luo, 2021/01/22
- Re: [PATCH 8/8] configure: automatically parse command line for meson -D options, Paolo Bonzini, 2021/01/23
[PATCH 7/8] configure: quote command line arguments in config.status,
Paolo Bonzini <=
[PATCH 6/8] configure: move Cocoa incompatibility checks to Meson, Paolo Bonzini, 2021/01/07