3 # check_ml_headers - check headers of *.ML files in distribution for inconsistencies
5 # requires some GNU tools
20 ISABELLE_SRC="$(isabelle getenv -b ISABELLE_HOME)/src/"
22 for LOC in $(find "$ISABELLE_SRC" -name "*.ML")
24 TITLE="$(head -n 1 "$LOC" | grep -Po '(?<=Title:)\s*\S+.ML' | grep -Po '\S+.ML')"
25 FILELOC="${LOC:${#ISABELLE_SRC}}"
26 if [ "$TITLE" != "$FILELOC" ]
28 if [ -n "$TITLE" -o \( -n "$REPORT_EMPTY" -a $(basename "$FILELOC") != "ROOT.ML" \) ]
30 if [ -z "$ONLY_FILENAMES" ]
32 echo "Inconsistency in $LOC: $TITLE"