bind9/util/check-cocci
2019-03-19 20:15:27 +01:00

15 lines
333 B
Bash
Executable file

#!/bin/sh
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";
if [ "$(< "$patch" wc -l)" -gt "0" ]; then
cat "$patch"
ret=1
else
rm "$patch"
fi
done
exit $ret