]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Make util/check-cocci modify the files in place and be more verbose
authorOndřej Surý <ondrej@sury.org>
Fri, 12 Jul 2019 13:38:48 +0000 (15:38 +0200)
committerOndřej Surý <ondrej@sury.org>
Fri, 12 Jul 2019 13:38:48 +0000 (15:38 +0200)
util/check-cocci

index 7231596c9d88b283af6da3b3dc63e112374b77c3..e6d501d7bf272efa09938e0ea298619155e0aec4 100755 (executable)
@@ -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