summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcoccinelle/run-coccinelle.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/coccinelle/run-coccinelle.sh b/coccinelle/run-coccinelle.sh
index f463f5eed5..8c4ed07dd8 100755
--- a/coccinelle/run-coccinelle.sh
+++ b/coccinelle/run-coccinelle.sh
@@ -1,9 +1,12 @@
#!/bin/bash -e
-for SCRIPT in ${@-*.cocci} ; do
+files="$(git ls-files ':/*.[ch]')"
+
+for SCRIPT in ${@-coccinelle/*.cocci} ; do
echo "--x-- Processing $SCRIPT --x--"
TMPFILE=`mktemp`
- ( set -x ; spatch --sp-file $SCRIPT --dir $PWD/.. 2> "$TMPFILE" || cat "$TMPFILE" )
+ echo "+ spatch --sp-file $SCRIPT ..."
+ spatch --sp-file $SCRIPT $files 2>"$TMPFILE" || cat "$TMPFILE"
rm "$TMPFILE"
echo -e "--x-- Processed $SCRIPT --x--\n"
done