Home
last modified time | relevance | path

Searched hist:"79 f8990d9d28539864d8f97f9f1cb32e289e595f" (Results 1 – 1 of 1) sorted by relevance

/optee_os/scripts/
H A Dcheckpatch_inc.sh79f8990d9d28539864d8f97f9f1cb32e289e595f Mon Dec 04 16:23:34 UTC 2023 Clement Faure <clement.faure@nxp.com> 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>