[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
shishi/doc gendocs.sh
From: |
shishi-commit |
Subject: |
shishi/doc gendocs.sh |
Date: |
Wed, 26 Nov 2003 11:49:23 -0500 |
CVSROOT: /cvsroot/shishi
Module name: shishi
Branch:
Changes by: Simon Josefsson <address@hidden> 03/11/26 11:49:23
Modified files:
doc : gendocs.sh
Log message:
Sync with texinfo.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/shishi/shishi/doc/gendocs.sh.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: shishi/doc/gendocs.sh
diff -u shishi/doc/gendocs.sh:1.2 shishi/doc/gendocs.sh:1.3
--- shishi/doc/gendocs.sh:1.2 Sat Nov 1 19:53:08 2003
+++ shishi/doc/gendocs.sh Wed Nov 26 11:49:23 2003
@@ -1,7 +1,7 @@
#!/bin/sh
# gendocs.sh -- generate a GNU manual in many formats. This script is
# mentioned in maintain.texi. See the help message below for usage details.
-# $Id: gendocs.sh,v 1.7 2003/11/02 00:51:31 jas Exp $
+# $Id: gendocs.sh,v 1.8 2003/11/23 19:02:09 karl Exp $
#
# Copyright (C) 2003 Free Software Foundation, Inc.
#
@@ -26,10 +26,20 @@
prog="`basename \"$0\"`"
srcdir=`pwd`
-scripturl="http://savannah.gnu.org/cgi-bin/viewcvs/shishi/shishi/doc/gendocs.sh"
-templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/shishi/shishi/doc/gendocs_template"
+scripturl="http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs.sh"
+templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs_template"
-rcs_revision='$Revision: 1.7 $'
+: ${MAKEINFO="makeinfo"}
+: ${TEXI2DVI="texi2dvi"}
+: ${DVIPS="dvips"}
+: ${DOCBOOK2TXT="docbook2txt"}
+: ${DOCBOOK2HTML="docbook2html"}
+: ${DOCBOOK2PDF="docbook2pdf"}
+: ${DOCBOOK2PS="docbook2ps"}
+: ${GENDOCS_TEMPLATE_DIR="."}
+unset CDPATH
+
+rcs_revision='$Revision: 1.8 $'
rcs_version=`set - $rcs_revision; echo $2`
program=`echo $0 | sed -e 's!.*/!!'`
version="gendocs.sh $rcs_version
@@ -42,9 +52,12 @@
usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE
Generate various output formats from PACKAGE.texinfo (or .texi or .txi) source.
+See the GNU Maintainers document for a more extensive discussion:
+ http://www.gnu.org/prep/maintain_toc.html
Options:
- -o OUTDIR write to OUTDIR, instead of manual/.
+ -o OUTDIR write files into OUTDIR, instead of manual/.
+ --docbook convert to DocBook too (xml, txt, html, pdf and ps).
--help display this help and exit successfully.
--version display version information and exit successfully.
@@ -58,14 +71,13 @@
Output will be in a new subdirectory \"manual\" (by default, use -o OUTDIR
to override). Move all the new files into your web CVS tree, as
-explained in the Web Pages node of maintain.texi:
-http://www.gnu.org/prep/maintain_toc.html
+explained in the Web Pages node of maintain.texi.
MANUAL-TITLE is included as part of the HTML <title> of the overall
manual/index.html file. It should include the name of the package being
documented. manual/index.html is created by substitution from the file
-$GENDOCS_TEMPLATE_DIR/gendocs_template; you can modify this generic
-version for your own purposes, if you like.
+$GENDOCS_TEMPLATE_DIR/gendocs_template. (Feel free to modify the
+generic template for your own purposes.)
If you have several manuals, you'll need to run this script several
times with different YOURMANUAL values, specifying a different output
@@ -75,17 +87,9 @@
You can set the environment variables MAKEINFO, TEXI2DVI, and DVIPS to
control the programs that get executed, and GENDOCS_TEMPLATE_DIR to
control where the gendocs_template file is looked for.
-"
-: ${MAKEINFO="makeinfo"}
-: ${TEXI2DVI="texi2dvi"}
-: ${DVIPS="dvips"}
-: ${DOCBOOK2TXT="docbook2txt"}
-: ${DOCBOOK2HTML="docbook2html"}
-: ${DOCBOOK2PDF="docbook2pdf"}
-: ${DOCBOOK2PS="docbook2ps"}
-: ${GENDOCS_TEMPLATE_DIR="."}
-unset CDPATH
+Email bug reports or enhancement requests to address@hidden
+"
calcsize()
{
@@ -102,6 +106,7 @@
--help) echo "$usage"; exit 0;;
--version) echo "$version"; exit 0;;
-o) shift; outdir=$1;;
+ --docbook) docbook=yes;;
-*)
echo "$0: Unknown or ambiguous option \`$1'." >&2
echo "$0: Try \`--help' for more information." >&2
@@ -137,9 +142,6 @@
fi
echo Generating output formats for $srcfile
-# remove any old junk
-rm -f $outdir/*.{gz,ps,pdf,html,txt,xml}
-rm -rf $outdir/html_node/*.html $outdir/html_node_db/*.html
echo Generating info files...
${MAKEINFO} -o $PACKAGE.info $srcfile
@@ -193,11 +195,14 @@
else
echo "$0: can't find split html dir for $srcfile." >&2
fi
-(cd ${split_html_dir} && tar czf - *.html) > \
- $outdir/${PACKAGE}_html_node.tar.gz
+(
+ cd ${split_html_dir} || exit 1
+ tar -czf ../$outdir/${PACKAGE}_html_node.tar.gz -- *.html
+)
html_node_tgz_size="`calcsize $outdir/${PACKAGE}_html_node.tar.gz`"
-mkdir -p $outdir/html_node
-mv ${split_html_dir}/* $outdir/html_node/
+rm -f $outdir/html_node/*.html
+mkdir -p $outdir/html_node/
+mv ${split_html_dir}/*.html $outdir/html_node/
rmdir ${split_html_dir}
echo Making .tar.gz for sources...
@@ -205,38 +210,43 @@
tar czfh $outdir/$PACKAGE.texi.tar.gz $srcfiles
texi_tgz_size="`calcsize $outdir/$PACKAGE.texi.tar.gz`"
-echo Generating docbook XML...
-${MAKEINFO} -o - --docbook $srcfile > ${srcdir}/$PACKAGE-db.xml
-docbook_xml_size="`calcsize $PACKAGE-db.xml`"
-gzip -f -9 -c $PACKAGE-db.xml >$outdir/$PACKAGE-db.xml.gz
-docbook_xml_gz_size="`calcsize $outdir/$PACKAGE-db.xml.gz`"
-mv $PACKAGE-db.xml $outdir/
-
-echo Generating docbook HTML...
-split_html_db_dir=html_node_db
-${DOCBOOK2HTML} -o $split_html_db_dir ${outdir}/$PACKAGE-db.xml
-(cd ${split_html_db_dir} && tar czf - *.html) > \
- $outdir/${PACKAGE}_html_node_db.tar.gz
-html_node_db_tgz_size="`calcsize $outdir/${PACKAGE}_html_node_db.tar.gz`"
-mkdir -p $outdir/html_node_db
-mv ${split_html_db_dir}/* $outdir/html_node_db/
-rmdir ${split_html_db_dir}
-
-echo Generating docbook ASCII...
-${DOCBOOK2TXT} ${outdir}/$PACKAGE-db.xml
-docbook_ascii_size="`calcsize $PACKAGE-db.txt`"
-mv $PACKAGE-db.txt $outdir/
-
-echo Generating docbook PS...
-${DOCBOOK2PS} ${outdir}/$PACKAGE-db.xml
-gzip -f -9 -c $PACKAGE-db.ps >$outdir/$PACKAGE-db.ps.gz
-docbook_ps_gz_size="`calcsize $outdir/$PACKAGE-db.ps.gz`"
-mv $PACKAGE-db.ps $outdir/
-
-echo Generating docbook PDF...
-${DOCBOOK2PDF} ${outdir}/$PACKAGE-db.xml
-docbook_pdf_size="`calcsize $PACKAGE-db.pdf`"
-mv $PACKAGE-db.pdf $outdir/
+if test -n "$docbook"; then
+ echo Generating docbook XML...
+ ${MAKEINFO} -o - --docbook $srcfile > ${srcdir}/$PACKAGE-db.xml
+ docbook_xml_size="`calcsize $PACKAGE-db.xml`"
+ gzip -f -9 -c $PACKAGE-db.xml >$outdir/$PACKAGE-db.xml.gz
+ docbook_xml_gz_size="`calcsize $outdir/$PACKAGE-db.xml.gz`"
+ mv $PACKAGE-db.xml $outdir/
+
+ echo Generating docbook HTML...
+ split_html_db_dir=html_node_db
+ ${DOCBOOK2HTML} -o $split_html_db_dir ${outdir}/$PACKAGE-db.xml
+ (
+ cd ${split_html_db_dir} || exit 1
+ tar -czf ../$outdir/${PACKAGE}_html_node_db.tar.gz -- *.html
+ )
+ html_node_db_tgz_size="`calcsize $outdir/${PACKAGE}_html_node_db.tar.gz`"
+ rm -f $outdir/html_node_db/*.html
+ mkdir -p $outdir/html_node_db
+ mv ${split_html_db_dir}/*.html $outdir/html_node_db/
+ rmdir ${split_html_db_dir}
+
+ echo Generating docbook ASCII...
+ ${DOCBOOK2TXT} ${outdir}/$PACKAGE-db.xml
+ docbook_ascii_size="`calcsize $PACKAGE-db.txt`"
+ mv $PACKAGE-db.txt $outdir/
+
+ echo Generating docbook PS...
+ ${DOCBOOK2PS} ${outdir}/$PACKAGE-db.xml
+ gzip -f -9 -c $PACKAGE-db.ps >$outdir/$PACKAGE-db.ps.gz
+ docbook_ps_gz_size="`calcsize $outdir/$PACKAGE-db.ps.gz`"
+ mv $PACKAGE-db.ps $outdir/
+
+ echo Generating docbook PDF...
+ ${DOCBOOK2PDF} ${outdir}/$PACKAGE-db.xml
+ docbook_pdf_size="`calcsize $PACKAGE-db.pdf`"
+ mv $PACKAGE-db.pdf $outdir/
+fi
echo Writing index file...
curdate="`date '+%B %d, %Y'`"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- shishi/doc gendocs.sh,
shishi-commit <=