changeset 671:6d3d4d66c4c4

Improved docs building script.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 24 Sep 2007 16:27:25 +0000
parents 44a490cc41ec
children cdd1a8301d66
files README.txt docs/build-docs.sh
diffstat 2 files changed, 16 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/README.txt	Mon Sep 24 16:26:50 2007 +0000
+++ b/README.txt	Mon Sep 24 16:27:25 2007 +0000
@@ -9,7 +9,7 @@
 in various formats:
 
  * Multi-page HTML: docs/html/index.html
- * Single-page    : docs/manual.html
+ * Single-page    : docs/html/manual.html
  * ASCII text     : docs/manual.txt
 
 Newer, possibly more complete, versions of the HTML manual are
--- a/docs/build-docs.sh	Mon Sep 24 16:26:50 2007 +0000
+++ b/docs/build-docs.sh	Mon Sep 24 16:27:25 2007 +0000
@@ -1,9 +1,12 @@
 #!/bin/sh
 ### Settings
+UPURL="ccr@low.fi:public_html/ggrtf"
 SRCFILE="manual.sgml"
 SRCTMP="manual.xml"
+FOTMP="tmp.fo"
 HTMLPATH="html"
-HTMLFILE="manual.html"
+HTMLFILE="$HTMLPATH/manual.html"
+PDFFILE="manual.pdf"
 TXTFILE="manual.txt"
 PSFILE="manual.ps"
 XSLTPARAMS="--stringparam html.stylesheet manual.css"
@@ -96,7 +99,7 @@
 #rm -f "$PSFILE"
 #if test -n "$XMLROFF" && test -x "$XMLROFF" && test -e "$SRCTMP"; then
 #	echo "* PostScript"
-#	$XSLTPROC "$CATALOGS3" "$SRCTMP" > tmp.fo
+#	$XSLTPROC "$CATALOGS3" "$SRCTMP" > "$FOTMP"
 #fi
 #rm -f "$SRCTMP"
 
@@ -104,9 +107,9 @@
 ### Generate PDF
 if test -n "$GS" && test -x "$GS" && test -e "$PSFILE"; then
 	echo "* PDF ..."
-	rm -f manual.pdf
+	rm -f "$PDFFILE"
 	$GS -dSAFER -dCompatibilityLevel=1.2 -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
-	-sOutputFile=manual.pdf -dCompatibilityLevel=1.2 -c .setpdfwrite -f manual.ps
+	-sOutputFile=$PDFFILE -dCompatibilityLevel=1.2 -c .setpdfwrite -f manual.ps
 elif test -e "$PSFILE"; then
 	echo "*** WARNING! GhostScript does not seem to be installed."
 	echo "*** PDF version of the manual will not be generated."
@@ -129,3 +132,11 @@
 	fi
 fi
 
+### Remove temporary files
+rm -f "$SRCTMP" "$FOTMP"
+
+## Upload
+if test "x$1" = "x--upload"; then
+	scp $HTMLPATH/* manual.css "$UPURL/html/"
+	scp "$TXTFILE" "$PSFILE" "$PDFFILE" "$UPURL"
+fi