Mercurial > hg > batmud > ggrtf
changeset 639:d7b6d60112d5
Cleanups/fixes.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 10 Jun 2007 21:32:51 +0000 |
parents | 622a3fed04ad |
children | 6dc4d0b19975 |
files | docs/build-docs.sh |
diffstat | 1 files changed, 15 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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 \