aboutsummaryrefslogtreecommitdiff
path: root/scripts/build-many-glibcs.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build-many-glibcs.py')
-rwxr-xr-xscripts/build-many-glibcs.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index b0e0f5e8ef..517dec4974 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -423,7 +423,17 @@ class Context(object):
'date > "$this_log"\n'
'echo >> "$this_log"\n'
'echo "Description: $desc" >> "$this_log"\n'
- 'echo "Command: $*" >> "$this_log"\n'
+ 'printf "%s" "Command:" >> "$this_log"\n'
+ 'for word in "$@"; do\n'
+ ' if expr "$word" : "[]+,./0-9@A-Z_a-z-]\\\\{1,\\\\}\\$" > /dev/null; then\n'
+ ' printf " %s" "$word"\n'
+ ' else\n'
+ ' printf " \'"\n'
+ ' printf "%s" "$word" | sed -e "s/\'/\'\\\\\\\\\'\'/"\n'
+ ' printf "\'"\n'
+ ' fi\n'
+ 'done >> "$this_log"\n'
+ 'echo >> "$this_log"\n'
'echo "Directory: $dir" >> "$this_log"\n'
'echo "Path addition: $path" >> "$this_log"\n'
'echo >> "$this_log"\n'