From: Lennart Poettering Date: Fri, 23 Mar 2018 14:44:10 +0000 (+0100) Subject: run-coccinelle.sh: use set -x for showing command line of "spatch" X-Git-Tag: v239~480^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8559%2Fhead;p=thirdparty%2Fsystemd.git run-coccinelle.sh: use set -x for showing command line of "spatch" Let's make sure run-coccinelle.sh generates similar output as run-integration-tests.sh, hence use the same "set -x" logic. --- diff --git a/coccinelle/run-coccinelle.sh b/coccinelle/run-coccinelle.sh index de23546f191..f463f5eed5d 100755 --- a/coccinelle/run-coccinelle.sh +++ b/coccinelle/run-coccinelle.sh @@ -1,10 +1,9 @@ #!/bin/bash -e for SCRIPT in ${@-*.cocci} ; do - echo "--x-- Processing: spatch --sp-file $SCRIPT --dir $(pwd)/.. --x--" + echo "--x-- Processing $SCRIPT --x--" TMPFILE=`mktemp` - spatch --sp-file $SCRIPT --dir $(pwd)/.. 2> "$TMPFILE" || cat "$TMPFILE" + ( set -x ; spatch --sp-file $SCRIPT --dir $PWD/.. 2> "$TMPFILE" || cat "$TMPFILE" ) rm "$TMPFILE" - echo "--x-- Processed: spatch --sp-file $SCRIPT --dir $(pwd)/.. --x--" - echo "" + echo -e "--x-- Processed $SCRIPT --x--\n" done