try_parse.sh: add a verbose mode and a meaningful exit code.

This commit is contained in:
Nick Mathewson 2019-10-09 09:31:10 -04:00
parent 9ab96550da
commit 51c2097586

View File

@ -5,6 +5,8 @@
top="$(dirname "$0")/../.." top="$(dirname "$0")/../.."
exitcode=0
for fn in "$@"; do for fn in "$@"; do
if spatch -macro_file_builtins "$top"/scripts/coccinelle/tor-coccinelle.h \ if spatch -macro_file_builtins "$top"/scripts/coccinelle/tor-coccinelle.h \
@ -13,6 +15,13 @@ for fn in "$@"; do
: # it's perfect : # it's perfect
else else
echo "$fn" echo "$fn"
if test "${VERBOSE}" != ""; then
spatch -macro_file_builtins "$top"/scripts/coccinelle/tor-coccinelle.h \
-I "$top" -I "$top"/src -I "$top"/ext --parse-c "$fn"
fi
exitcode=1
fi fi
done done
exit "$exitcode"