2002-02-06 17:47:18 +00:00
|
|
|
#!/bin/sh -x
|
2003-11-26 10:43:05 +00:00
|
|
|
# Copyright (c) 2002,2003 Alexey Zelkin <phantom@FreeBSD.org>
|
2002-02-06 17:47:18 +00:00
|
|
|
#
|
2002-02-06 18:00:11 +00:00
|
|
|
# ent.sh -- this script checks {authors,teams}.ent files for correctness
|
2002-02-06 17:47:18 +00:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
|
2003-11-26 10:43:05 +00:00
|
|
|
: ${CVSROOT=/home/dcvs}
|
2002-02-06 17:47:18 +00:00
|
|
|
prefix=doc/en_US.ISO8859-1/share/sgml
|
2003-11-26 10:43:05 +00:00
|
|
|
cvs='cvs -Q -R co -p'
|
2002-02-06 17:47:18 +00:00
|
|
|
diff='diff -u'
|
|
|
|
tmp=${TMPDIR-/tmp}/_entities
|
|
|
|
|
|
|
|
ckfile() {
|
|
|
|
|
|
|
|
ckf=$1
|
|
|
|
|
|
|
|
$cvs $prefix/$ckf 2>/dev/null |
|
|
|
|
grep ENTITY |
|
|
|
|
awk '{ print $2 }' > $tmp.entsrc
|
|
|
|
sort -u $tmp.entsrc > $tmp.entsrc2
|
|
|
|
$diff $tmp.entsrc $tmp.entsrc2 > $ckf.order
|
|
|
|
|
|
|
|
$cvs $prefix/$ckf 2>/dev/null |
|
|
|
|
perl -ne 'print "$1 -- $2\n" if /ENTITY ([^ ]+).*<email>(.*)<\/email>/' |
|
|
|
|
grep -vi freebsd.org > $ckf.addr
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ckresults() {
|
|
|
|
|
|
|
|
ckf=$1
|
|
|
|
|
|
|
|
if [ -s $ckf.order ]; then
|
|
|
|
echo "Ordering check for $ckf failed. See $ckf.ordering file for details."
|
|
|
|
else
|
|
|
|
rm -f $ckf.order
|
|
|
|
echo "Ordering check for $ckf is Ok. "
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -s $ckf.addr ]; then
|
|
|
|
echo "Email addresses for $ckf failed. See $ckf.addr file for details."
|
|
|
|
else
|
|
|
|
rm -f $ckf.addr
|
|
|
|
echo "Email addresses check for $ckf is Ok. "
|
|
|
|
fi
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ckfile "authors.ent"
|
|
|
|
ckfile "teams.ent"
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
ckresults "authors.ent"
|
|
|
|
ckresults "teams.ent"
|
|
|
|
|
|
|
|
rm -f $tmp.entsrc $tmp.entsrc2
|