# HG changeset patch # User Matti Hamalainen # Date 1181511171 0 # Node ID d7b6d60112d51f43fe4c711ed0203c888cab2a4d # Parent 622a3fed04adfaaaedcfb885225ffd15870799ab Cleanups/fixes. diff -r 622a3fed04ad -r d7b6d60112d5 docs/build-docs.sh --- a/docs/build-docs.sh Sat Jun 09 13:56:10 2007 +0000 +++ b/docs/build-docs.sh Sun Jun 10 21:32:51 2007 +0000 @@ -5,6 +5,7 @@ HTMLPATH="html" HTMLFILE="manual.html" TXTFILE="manual.txt" +PSFILE="manual.ps" ### Get paths, if available echo "* Initialization" @@ -14,8 +15,10 @@ GIFTOPNM=`which giftopnm` TIDY=`which tidy` XSLTPROC=`which xsltproc` -CATALOGS1=`locate xhtml/chunk.xsl` -CATALOGS2=`locate xhtml/docbook.xsl` +XMLROFF=`which xmlroff` +CATALOGS1=`locate xhtml/chunk.xsl|head -1` +CATALOGS2=`locate xhtml/docbook.xsl|head -1` +CATALOGS3=`locate fo/docbook.xsl|head -1` LINKS=`which links` ELINKS=`which elinks` LYNX=`which lynx` @@ -81,18 +84,24 @@ echo "** Checking for HTML Tidy ..." if test -n "$TIDY" && test -x "$TIDY"; then echo "** Found, cleaning up the mess by DocBook .." - $TIDY -w 80 -utf8 -asxhtml -i -m $HTMLPATH/*.html "$HTMLFILE" + $TIDY -w 120 -utf8 -asxhtml -i -m $HTMLPATH/*.html "$HTMLFILE" else echo "*** WARNING! HTML tidy not found." fi fi ### Generate PostScript file -#echo "* PostScript" -rm -f manual.ps +rm -f "$PSFILE" +if test -n "$XMLROFF" && test -x "$XMLROFF" && test -e "$SRCTMP"; then + echo "* PostScript" + $XSLTPROC "$CATALOGS3" "$SRCTMP" > tmp.fo +fi + +#rm -f "$SRCTMP" + ### Generate PDF -if test -n "$GS" && test -x "$GS" && test -e manual.ps; then +if test -n "$GS" && test -x "$GS" && test -e "$PSFILE"; then echo "* PDF ..." rm -f manual.pdf $GS -dSAFER -dCompatibilityLevel=1.2 -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \