package / ocaml-base-compiler.4.10.0 / manual / tests / check-stdlib-modules
1 #!/bin/sh
2
3 TMPDIR="${TMPDIR:-/tmp}"
4
5 (cd $1/stdlib; ls -1 *.mli) | sed -e 's/\.mli//' >$TMPDIR/stdlib-$$-files
6 cut -c 1 $TMPDIR/stdlib-$$-files | tr a-z A-Z >$TMPDIR/stdlib-$$-initials
7 cut -c 2- $TMPDIR/stdlib-$$-files \
8 | paste -d '\0' $TMPDIR/stdlib-$$-initials - >$TMPDIR/stdlib-$$-modules
9
10 exitcode=0
11 for i in `cat $TMPDIR/stdlib-$$-modules`; do
12 case $i in
13 Stdlib | Camlinternal* | *Labels | Obj | Pervasives) continue;;
14 esac
15 grep -q -e '"'$i'" & p\.~\\pageref{'$i'} &' $1/manual/manual/library/stdlib-blurb.etex || {
16 echo "Module $i is missing from stdlib-blurb.etex." >&2
17 exitcode=2
18 }
19 done
20
21 rm -f $TMPDIR/stdlib-$$-*
22
23 exit $exitcode
24