1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-28 20:25:25 +03:00
systemd-stable/coccinelle/run-coccinelle.sh

13 lines
360 B
Bash
Raw Normal View History

#!/bin/bash -e
files="$(git ls-files ':/*.[ch]')"
for SCRIPT in ${@-coccinelle/*.cocci} ; do
echo "--x-- Processing $SCRIPT --x--"
TMPFILE=`mktemp`
echo "+ spatch --sp-file $SCRIPT ..."
spatch --sp-file $SCRIPT $files 2>"$TMPFILE" || cat "$TMPFILE"
rm "$TMPFILE"
echo -e "--x-- Processed $SCRIPT --x--\n"
done