blob: 51279a032115f3b71a3445d62d3425d859255607 [file] [log] [blame]
Fred Drakec58f3461999-01-08 15:27:17 +00001#! /bin/sh
2# -*- Ksh -*-
3
4
5PERL=${PERL:-perl}
6EMACS=${EMACS:-emacs}
7MAKEINFO=${MAKEINFO:-makeinfo}
8
9
10# Normalize file name since something called by html2texi.pl seems to
11# screw up with relative path names.
12FILENAME="$1"
13DOCDIR=`dirname "$FILENAME"`
14DOCFILE=`basename "$FILENAME"`
15DOCNAME=`basename "$FILENAME" .html`
16
17WORKDIR=`pwd`
18cd `dirname $0`
19TOOLSDIR=`pwd`
20cd $DOCDIR
21DOCDIR=`pwd`
22cd $WORKDIR
23
24
25run() {
26 echo "$@"
27 $* || exit $?
28}
29
30
31# generate the Texinfo file:
32
33run $PERL -I$TOOLSDIR $TOOLSDIR/html2texi.pl $DOCDIR/$DOCFILE
34run $EMACS -batch -l $TOOLSDIR/fixinfo.el $DOCNAME.texi
35rm -f $DOCNAME.texi~
36
37
38# generate the .info files:
39
40run $MAKEINFO --footnote-style end --fill-column 72 \
41 --paragraph-indent 0 $DOCNAME.texi