diff options
| author | Benjamin Philip <benjamin.philip495@gmail.com> | 2026-01-06 22:08:34 +0300 |
|---|---|---|
| committer | Julia Lawall <Julia.Lawall@inria.fr> | 2026-02-21 19:22:00 +0300 |
| commit | 8952cfe431cf5b1d615f054f698cd74034bd1385 (patch) | |
| tree | b9c2b884529cb62f07afbca7fa099bbaa2de2c50 /scripts | |
| parent | d79526b89571ae447c1a5cfd3d627efa07098348 (diff) | |
| download | linux-8952cfe431cf5b1d615f054f698cd74034bd1385.tar.xz | |
scripts: coccicheck: simplify debug file handling
This commit separates handling unset files and pre-existing files. It
also eliminates a duplicated check for unset files in run_cmd_parmap().
Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/coccicheck | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/coccicheck b/scripts/coccicheck index 89d591af5f3e..2efb74afef2b 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck @@ -138,7 +138,7 @@ run_cmd_parmap() { if [ $VERBOSE -ne 0 ] ; then echo "Running ($NPROC in parallel): $@" fi - if [ "$DEBUG_FILE" != "/dev/null" -a "$DEBUG_FILE" != "" ]; then + if [ "$DEBUG_FILE" != "/dev/null" ]; then echo $@>>$DEBUG_FILE $@ 2>>$DEBUG_FILE else @@ -259,13 +259,13 @@ coccinelle () { } -if [ "$DEBUG_FILE" != "/dev/null" -a "$DEBUG_FILE" != "" ]; then - if [ -f $DEBUG_FILE ]; then - echo "Debug file $DEBUG_FILE exists, bailing" - exit - fi -else - DEBUG_FILE="/dev/null" +if [ "$DEBUG_FILE" = "" ]; then + DEBUG_FILE="/dev/null" +fi + +if [ -f $DEBUG_FILE ]; then + echo "Debug file $DEBUG_FILE exists, bailing" + exit fi if [ "$COCCI" = "" ] ; then |
