]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coccinelle: slightly improve run-coccinelle.sh
authorLennart Poettering <lennart@poettering.net>
Mon, 26 Feb 2018 14:42:45 +0000 (15:42 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 28 Feb 2018 09:01:15 +0000 (10:01 +0100)
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.

coccinelle/run-coccinelle.sh

index e982e3b0fca4c295483a6b974fc81ee4667f07f2..de23546f191f648f76e3d7924ffbebb21164fa1b 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/bash -e
 
 for SCRIPT in ${@-*.cocci} ; do
-        echo "--x-- Processing $SCRIPT --x--"
+        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 $SCRIPT --x--"
+        echo "--x-- Processed: spatch --sp-file $SCRIPT --dir $(pwd)/.. --x--"
         echo ""
 done