[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/20] configure: quote command line arguments in config.status
From: |
Paolo Bonzini |
Subject: |
[PULL 19/20] configure: quote command line arguments in config.status |
Date: |
Tue, 12 Jan 2021 18:14:49 +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 17aa595343..155dda124c 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"
@@ -6519,7 +6523,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
- [PULL 09/20] scripts/gdb: fix 'qemu coroutine' when users selects a non topmost stack frame, (continued)
- [PULL 09/20] scripts/gdb: fix 'qemu coroutine' when users selects a non topmost stack frame, Paolo Bonzini, 2021/01/12
- [PULL 08/20] meson: fix Cocoa option in summary, Paolo Bonzini, 2021/01/12
- [PULL 10/20] scripts/gdb: implement 'qemu bt', Paolo Bonzini, 2021/01/12
- [PULL 11/20] Docs/RCU: Correct sample code of qatomic_rcu_set, Paolo Bonzini, 2021/01/12
- [PULL 14/20] cocoa: do not enable coreaudio automatically, Paolo Bonzini, 2021/01/12
- [PULL 12/20] meson: Propagate gnutls dependency, Paolo Bonzini, 2021/01/12
- [PULL 13/20] virtio-scsi: trace events, Paolo Bonzini, 2021/01/12
- [PULL 15/20] gtk: remove CONFIG_GTK_GL, Paolo Bonzini, 2021/01/12
- [PULL 16/20] configure: move X11 detection to Meson, Paolo Bonzini, 2021/01/12
- [PULL 17/20] configure: move GTK+ detection to Meson, Paolo Bonzini, 2021/01/12
- [PULL 19/20] configure: quote command line arguments in config.status,
Paolo Bonzini <=
- Re: [PULL 00/20] Misc patches for 2021-01-12, no-reply, 2021/01/12
- Re: [PULL 00/20] Misc patches for 2021-01-12, Peter Maydell, 2021/01/13