aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/coccicheck
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/coccicheck')
-rwxr-xr-xscripts/coccicheck28
1 files changed, 21 insertions, 7 deletions
diff --git a/scripts/coccicheck b/scripts/coccicheck
index f8f15a269e1a..85d31899ad98 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -55,6 +55,14 @@ if [ "$ONLINE" = "0" ] ; then
55 echo '' 55 echo ''
56fi 56fi
57 57
58run_cmd() {
59 if [ $VERBOSE -ne 0 ] ; then
60 echo "Running: $@"
61 fi
62 eval $@
63}
64
65
58coccinelle () { 66coccinelle () {
59 COCCI="$1" 67 COCCI="$1"
60 68
@@ -100,15 +108,21 @@ coccinelle () {
100 fi 108 fi
101 109
102 if [ "$MODE" = "chain" ] ; then 110 if [ "$MODE" = "chain" ] ; then
103 $SPATCH -D patch $FLAGS -sp_file $COCCI $OPT $OPTIONS || \ 111 run_cmd $SPATCH -D patch \
104 $SPATCH -D report $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || \ 112 $FLAGS -sp_file $COCCI $OPT $OPTIONS || \
105 $SPATCH -D context $FLAGS -sp_file $COCCI $OPT $OPTIONS || \ 113 run_cmd $SPATCH -D report \
106 $SPATCH -D org $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || exit 1 114 $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || \
115 run_cmd $SPATCH -D context \
116 $FLAGS -sp_file $COCCI $OPT $OPTIONS || \
117 run_cmd $SPATCH -D org \
118 $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || exit 1
107 elif [ "$MODE" = "rep+ctxt" ] ; then 119 elif [ "$MODE" = "rep+ctxt" ] ; then
108 $SPATCH -D report $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff && \ 120 run_cmd $SPATCH -D report \
109 $SPATCH -D context $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1 121 $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff && \
122 run_cmd $SPATCH -D context \
123 $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
110 else 124 else
111 $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1 125 run_cmd $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
112 fi 126 fi
113 127
114} 128}