#!/bin/sh

# Rebuild NoSQL html pages and PostScript manual
# from the SGML source file.
# Author: Carlo Strozzi <carlos@linux.it>
#
# $Id: build-doc,v 1.3 2003/09/23 10:25:41 carlo Exp $

# Prevent gross mistakes.
which sgml2html || exit 1

echo 'Building the HTML pages from the SGML source file ...'
linuxdoc -B html --charset=latin NoSQL.sgml
echo 'Setting page background colors ...'
for i in *.html
do
   printf '1,$s/^<BODY>/<BODY BGCOLOR="#fff0e0">/\nw\nq\n' | ed -s $i
done

printf '1,$s/^<H1>NoSQL<\\/H1>/<IMG SRC="NoSQL.png" ALT="[NoSQL]"><\\/IMG><H1>NoSQL<\\/H1>/\nw\nq\n' | ed -s NoSQL.html

# Built the PostScript manual as well (this is no longer done).
#
#echo 'Building the PostScript manual from the SGML source file ...'
#linuxdoc -B latex --charset=latin --papersize=a4 --output=ps NoSQL.sgml

# End of file.
