1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

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.
This commit is contained in:
Lennart Poettering 2018-02-26 15:42:45 +01:00
parent e7685a77b4
commit 340c01be7c

View File

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