Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts: checkpatch: fix word splitting in the command
The following would fail with Zsh instead of Bash : $ source ./scripts/checkpatch_inc.sh $ checkpatch HEAD Unknown option: typedefsfile typedefs.checkpatch Usage: .../scripts/checkpatch.pl [OPTION]... [FILE] By setting xtrace in the _checkpatch() function, we can see the built command is interpreted differently depending on the shell: $CHECKPATCH $CHECKPATCH_OPT $typedefs_opt - In Zsh: /scripts/checkpatch.pl '--typedefsfile typedefs.checkpatch' - In Bash: /scripts/checkpatch.pl --typedefsfile typedefs.checkpatch - Bash differs from Zsh when it comes to word splitting for unquoted parameters expansions. One solution is to use `eval` to execute the built command. Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
- Loading branch information