Fix the check-cocci script to scan bin lib fuzz dirs individually, as it was using only the last one

This commit is contained in:
Ondřej Surý
2019-07-12 15:26:48 +02:00
parent 98eda76eb6
commit 5efc32ebae

View File

@@ -3,7 +3,10 @@
ret=0
for spatch in cocci/*.spatch; do
patch="$(dirname "$spatch")/$(basename "$spatch" .spatch).patch"
spatch --sp-file="$spatch" --use-gitgrep --dir bin --dir lib --dir fuzz --very-quiet > "$patch";
: > "$patch"
for dir in bin lib fuzz; do
spatch --sp-file="$spatch" --use-gitgrep --dir "$dir" --very-quiet >> "$patch";
done
if [ "$(< "$patch" wc -l)" -gt "0" ]; then
cat "$patch"
ret=1