#!/bin/sh # # @(#) mkgntexidir 1.3 95/02/01 11:51:26 # # mkgntexidir - Generate HTML documents from GNU "texi" manuals. # # Chip Rosenthal # Unicom Systems Development # chip@chinacat.unicom.com # http://www.unicom.com/ # # Edit at tabstops=4. # Progname=`basename $0` USAGE="usage: $Progname [document ...]" # # Before you use this script, you must: # # - Customize the site-specific definitions below. # - Write a $DESCR datafile that describes your library of documents. # # The command line arguments may be used to select the documents to # process. If no arguments are specified, the entire documentation # library is rebuild. Otherwise, only the named documents are processed. # If you want to rebuild the main menu without processing any of the # documents, specify a single bogus document name on the command line. # ############################################################################## # # Site-Specific Definitions. # # # Directories. # GN_ROOT=/pub/web # root of the "gn" tree GN_TEXI=online_docs/gnu_docs # where to put library, *relative* to GN_ROOT SRC_ROOT=/local/src # where most of your source packages reside GN_LIB=/local/libexec/gn # a convenience for the definitions below # # Files. # DESCR=$GN_LIB/Texi_docs # description file for the documents library TEXI2HTML=$GN_LIB/texi2html # Lionel Cons' texi-to-HTML perl script MKMENUS=$GN_LIB/mkmenus # my "mkmenus" utility MKCACHE=$GN_LIB/mkcache # the standard gn "mkcache" utility # # Other definitions. # MAILTO=webmaster@www.unicom.com # server maintainer TEXIOPTS="-verbose -split_node" # options for "texi2html" MENU=menu # output menu file name # # End of Site-Specific Definitions # ############################################################################## # # Check that necessary files and directories exist. # for d in $GN_ROOT $GN_ROOT/$GN_TEXI ; do if [ ! -d $d ] ; then echo "$Progname: cannot access directory \"$d\"" 1>&2 exit 1 fi done for f in $DESCR $TEXI2HTML $MKCACHE $MKMENUS ; do if [ ! -f $f ] ; then echo "$Progname: cannot access file \"$d\"" 1>&2 exit 1 fi done # # The command line specifies documents we should process. # process_list="$@" # # Open up the description file on fd 4. # exec 4<$DESCR || exit 1 # # Open up the stream for the main menu on fd 5. # exec 5>$GN_ROOT/$GN_TEXI/$MENU || exit 1 # # Initialize the menu. # cat << EOF >&5 Maintainer=mailto:$MAILTO HttpText=
This menu and document tree automatically constructed with Chip Rosenthal. The texi-to-HTML conversion was performed by Lionel Cons' texi2html.pl script. EndText= EOF # # Close the file streams # exec 4<&- 5>&- # # Rebuild the cache files. # ( set -x cd $GN_ROOT/$GN_TEXI && $MKCACHE -r -m $MENU )