#!/bin/sh

#
# Check for Doxygen warnings
#
nfiles="$(grep -c "Parsing file" < ../doc/doxygen.log)"
if nfails="$(grep -c Warning: ../doc/doxygen.log 2>/dev/null)"; then
  grep Warning: ../doc/doxygen.log | sed 's/\(.\{75\}\)...*/\1 .../'
fi

echo "$nfiles files, $nfails visible errors in documentation"

if test "$nfails" != "0"; then
  exit 1
fi

exit 0