Systemd/coccinelle/run-coccinelle.sh
Lennart Poettering 3708254f36 coccinelle: improve run-coccinelle.sh to take list of scripts to run
Let's tweak run-coccinelle.sh to optionally take a list of scripts to
run. If not specified, run all scripts, as before.
2017-12-07 12:11:13 +01:00

12 lines
341 B
Bash
Executable file

#!/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