: [ -f /tmp/pgsql_sgml ] && exit trap "rm -f /tmp/$$ /tmp/$$a /tmp/$$b /tmp/pgsql_sgml" 0 1 2 3 15 touch /tmp/pgsql_sgml cd /pgsgmlbuild >/tmp/$$a while test "X$1" = "X-f" || pgcvs update sgml 2>&1 | grep -v '\[update aborted\]' | grep -v '^?' >/tmp/$$a do echo "\nBuild: `date`" >>build.dates cat /tmp/$$a >>build.dates echo "PostgreSQL CVS Documentation Build" >/tmp/$$ echo "----------------------------------\n" >>/tmp/$$ echo "Build started: `date`" >>/tmp/$$ gmake postgres.tar.gz 2>&1 | grep -v DTDDECL > /tmp/$$b echo "Build completed: `date`\n" >>/tmp/$$ echo "Changes in this build:" >>/tmp/$$ cat /tmp/$$a >>/tmp/$$ echo "\nA full copy of this documenation is at ftp://candle.pha.pa.us/pub/postgresql/postgresql-docs.tar.gz\n" >>/tmp/$$ if grep -qi 'error' /tmp/$$b || grep -qi ':E:' /tmp/$$b then echo "\nThere were errors in this build. They appear in red.\n" >>/tmp/$$ cat /tmp/$$b >>/tmp/$$ else echo "\nBuild completed successfully." >>/tmp/$$ fi 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;^.*[Ee]rror.*$;&;' 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 sgml/*.gif /var/www/docs/main/writings/pgsql/sgml cp postgres.tar.gz /pgftp/postgresql-docs.tar.gz gmake clean >/dev/null 2>&1 [ "X$1" = "X-f" ] && break done