Use "$@" instead of bare $@ to protect arguments

Bash expands bare $@, and then do word-splitting and file-globing. It breaks command-line arguments
for arduino if command-line arguments for the wrapper script contains $IFS, '*', '?' and etc. characters.

Use "$@" in this case.
This commit is contained in:
SATOH Fumiyasu 2016-01-06 22:09:04 +09:00
parent ff13b303d4
commit ad65e53888
1 changed files with 1 additions and 1 deletions

View File

@ -289,7 +289,7 @@ afterwards:
#!/bin/bash
Xvfb :1 -nolisten tcp -screen :1 1280x800x24 &
xvfb="$!"
DISPLAY=:1 arduino $@
DISPLAY=:1 arduino "$@"
kill -9 $xvfb
Save the script as *arduino-headless* and run it with the options described above.