From: Ondřej Surý Date: Fri, 12 Jul 2019 13:38:48 +0000 (+0200) Subject: Make util/check-cocci modify the files in place and be more verbose X-Git-Tag: v9.15.3~48^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9f916b000e490c8bccc57d9a3195c2c8e777a41c;p=thirdparty%2Fbind9.git Make util/check-cocci modify the files in place and be more verbose --- diff --git a/util/check-cocci b/util/check-cocci index 7231596c9d8..e6d501d7bf2 100755 --- a/util/check-cocci +++ b/util/check-cocci @@ -1,18 +1,10 @@ #!/bin/sh +set -e -ret=0 for spatch in cocci/*.spatch; do - patch="$(dirname "$spatch")/$(basename "$spatch" .spatch).patch" - : > "$patch" for dir in bin lib fuzz; do - spatch --sp-file="$spatch" --use-gitgrep --dir "$dir" --very-quiet >> "$patch"; + spatch --sp-file="$spatch" --use-gitgrep --dir "$dir" --in-place --quiet done - if [ "$(< "$patch" wc -l)" -gt "0" ]; then - cat "$patch" - ret=1 - else - rm "$patch" - fi done -exit $ret +exit 0