1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00
systemd/coccinelle/run-coccinelle.sh
Lennart Poettering 2d0bc68450 coccinelle: add a run-coccinelle.sh script that runs all scripts
One day we should start running something like this as part of CI so
that non-well-formed commits are not even accepted...
2017-11-29 20:12:26 +01:00

12 lines
336 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