autotest: quote words as they go into generated ritw file

This commit is contained in:
Peter Barker 2017-04-28 21:35:37 +10:00 committed by Andrew Tridgell
parent 55ac480e91
commit ca5bf02d7c

View File

@ -25,7 +25,7 @@ if [ -n "$SITL_RITW_TERMINAL" ]; then
FILENAME="ritw-`date '+%Y%m%d%H%M%S'`"
FILEPATH="$TMPDIR/$FILENAME"
echo "#!/bin/sh" >"$FILEPATH"
echo "$*" >>"$FILEPATH"
printf "%q " "$@" >>"$FILEPATH"
chmod +x "$FILEPATH"
$SITL_RITW_TERMINAL "$FILEPATH" &
elif [ -n "$DISPLAY" -a -n "$(which osascript)" ]; then