:
trap "rm -f /tmp/$$ /tmp/$$a /tmp/pgsql_sgml" 0 1 2 3 15
[ -f /tmp/pgsql_sgml ] && exit
touch /tmp/pgsql_sgml
cd /u/src/gen/pgsql/sgml/pgsql/doc/src
while pgcvs update . 2>&1 | grep -v '^?' >/tmp/$$a
do
echo "Build: `date`" >>build.dates
cat /tmp/$$a >>build.dates
echo "PostgreSQL CVS Documentation Build" >/tmp/$$
echo "==================================\n" >>/tmp/$$
echo "Build started: `date`\n" >>/tmp/$$
gmake 2>&1 | grep -v DTDDECL >> /tmp/$$
echo "Build completed: `date`\n" >>/tmp/$$
echo "Changes in this build:"
cat /tmp/$$a >>/tmp/$$
echo "\nErrors appear in red.\n" >>/tmp/$$
pipe sed 's;HTML.manifest:;HTML.manifest :;g' /tmp/$$
txt2html -m -s 100 -p 100 --title "PostgreSQL CVS Docs built `date`" \
--link /u/txt2html/txt2html.dict \
--append_head /u/txt2html/BODY /tmp/$$ >build.html
pipe sed 's;^.*error.*$;&;' build.html
pipe sed 's;^.*Error.*$;&;' build.html
pipe sed 's;^.*:E:.*$;&;' build.html
rm -f /var/www/docs/main/writings/pgsql/sgml/*
mv sgml/*.html build.html /var/www/docs/main/writings/pgsql/sgml
cp sgml/*.css /var/www/docs/main/writings/pgsql/sgml
done