File: check-all.sh

package info (click to toggle)
rocq-stdlib 9.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 11,828 kB
  • sloc: python: 2,928; sh: 444; makefile: 319; javascript: 24; ml: 2
file content (20 lines) | stat: -rwxr-xr-x 630 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

# Check that theories/All/All.v is up to date

ALL_FILES=all_files__
ACTUAL_FILES=actual_files__

rm -f ${ALL_FILES} ${ACTUAL_FILES}
grep "Require" theories/All/All.v | sed -e 's/From.*Require.*Export.*[.]\([a-zA-Z]\)/\1/' | sort > ${ALL_FILES}
(for f in $(find theories -name "*.v" -type f) ; do basename ${f%v} ; done) | grep -v "^All[.]$" | sort > ${ACTUAL_FILES}

if $(diff -q ${ALL_FILES} ${ACTUAL_FILES} > /dev/null) ; then
  echo "theories/All/All.v is up to date."
else
  echo "Error: theories/All/All.v needs some update:"
  diff -u ${ALL_FILES} ${ACTUAL_FILES}
  exit 1
fi

rm -f ${ALL_FILES} ${ACTUAL_FILES}