summaryrefslogtreecommitdiff
path: root/coccinelle/run-coccinelle.sh
blob: fe3aeb68ce9bff3293f32908c72c03d3542206b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash -e

for SCRIPT in *.cocci ; do
        [ "$SCRIPT" = "empty-if.cocci" ] && continue
        echo "--x-- Processing $SCRIPT --x--"
        TMPFILE=`mktemp`
        spatch --sp-file $SCRIPT --dir $(pwd)/.. 2> "$TMPFILE" || cat "$TMPFILE"
        rm "$TMPFILE"
        echo "--x-- Processed $SCRIPT --x--"
        echo ""
done