1999-01-08 15:27:17 +00:00
|
|
|
#! /bin/sh
|
|
|
|
# -*- Ksh -*-
|
|
|
|
|
1999-01-08 15:32:27 +00:00
|
|
|
# Script to drive the HTML-info conversion process.
|
|
|
|
# Pass in a single parameter: the name of the top-level HTML file
|
|
|
|
# generated by LaTeX2HTML.
|
|
|
|
#
|
|
|
|
# Written by Fred L. Drake, Jr. <fdrake@acm.org>
|
1999-01-08 15:27:17 +00:00
|
|
|
|
|
|
|
PERL=${PERL:-perl}
|
|
|
|
EMACS=${EMACS:-emacs}
|
|
|
|
MAKEINFO=${MAKEINFO:-makeinfo}
|
|
|
|
|
|
|
|
|
|
|
|
# Normalize file name since something called by html2texi.pl seems to
|
|
|
|
# screw up with relative path names.
|
|
|
|
FILENAME="$1"
|
|
|
|
DOCDIR=`dirname "$FILENAME"`
|
|
|
|
DOCFILE=`basename "$FILENAME"`
|
|
|
|
DOCNAME=`basename "$FILENAME" .html`
|
|
|
|
|
1999-01-08 15:32:27 +00:00
|
|
|
# Now build the real directory names, and locate our support stuff:
|
1999-01-08 15:27:17 +00:00
|
|
|
WORKDIR=`pwd`
|
|
|
|
cd `dirname $0`
|
|
|
|
TOOLSDIR=`pwd`
|
|
|
|
cd $DOCDIR
|
|
|
|
DOCDIR=`pwd`
|
|
|
|
cd $WORKDIR
|
|
|
|
|
|
|
|
|
|
|
|
run() {
|
1999-01-08 15:32:27 +00:00
|
|
|
# show what we're doing, like make does:
|
|
|
|
echo "$*"
|
1999-01-08 15:27:17 +00:00
|
|
|
$* || exit $?
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# generate the Texinfo file:
|
|
|
|
|
|
|
|
run $PERL -I$TOOLSDIR $TOOLSDIR/html2texi.pl $DOCDIR/$DOCFILE
|
|
|
|
run $EMACS -batch -l $TOOLSDIR/fixinfo.el $DOCNAME.texi
|
|
|
|
rm -f $DOCNAME.texi~
|
|
|
|
|
|
|
|
|
|
|
|
# generate the .info files:
|
|
|
|
|
|
|
|
run $MAKEINFO --footnote-style end --fill-column 72 \
|
|
|
|
--paragraph-indent 0 $DOCNAME.texi
|