1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 23:21:22 +03:00
systemd/coccinelle/run-coccinelle.sh
Lennart Poettering 340c01be7c coccinelle: slightly improve run-coccinelle.sh
Let's include the command line to use to get the requested output. This
makes it easy to copy/paste the command line out, and add "--in-place"
to actually apply the changes "run-coccinelle.sh" outputs.
2018-02-28 10:01:15 +01:00

11 lines
356 B
Bash
Executable File

#!/bin/bash -e
for SCRIPT in ${@-*.cocci} ; do
echo "--x-- Processing: spatch --sp-file $SCRIPT --dir $(pwd)/.. --x--"
TMPFILE=`mktemp`
spatch --sp-file $SCRIPT --dir $(pwd)/.. 2> "$TMPFILE" || cat "$TMPFILE"
rm "$TMPFILE"
echo "--x-- Processed: spatch --sp-file $SCRIPT --dir $(pwd)/.. --x--"
echo ""
done