1998-10-27 21:59:03 +00:00
|
|
|
#! /usr/bin/env ksh
|
1998-03-10 23:23:05 +00:00
|
|
|
|
1998-08-12 17:50:07 +00:00
|
|
|
# This script may be invoked by naming it directly or via a shell alias,
|
|
|
|
# but NOT through a symbolic link. Perhaps a future version will allow
|
|
|
|
# the use of a symbolic link.
|
|
|
|
#
|
|
|
|
# Using a symbolic link will cause the script to not be able to locate
|
|
|
|
# its support files.
|
|
|
|
|
1998-03-10 23:23:05 +00:00
|
|
|
MYDIR=`dirname $0`
|
1998-03-24 17:48:20 +00:00
|
|
|
WORKDIR=`pwd`
|
|
|
|
cd $MYDIR
|
|
|
|
MYDIR=`pwd`
|
1998-04-02 15:37:13 +00:00
|
|
|
cd ..
|
|
|
|
TOPDIR=`pwd`
|
1998-03-24 17:48:20 +00:00
|
|
|
cd $WORKDIR
|
1998-03-10 23:23:05 +00:00
|
|
|
|
|
|
|
# DEFAULT_FORMAT must be upper case...
|
|
|
|
DEFAULT_FORMAT=PDF
|
|
|
|
USE_DEFAULT_FORMAT=true
|
1998-03-11 15:33:44 +00:00
|
|
|
DISCARD_TEMPS=true
|
1998-03-10 23:23:05 +00:00
|
|
|
|
1999-02-15 16:27:42 +00:00
|
|
|
CONFIG_FILES=''
|
1998-08-05 04:48:18 +00:00
|
|
|
ICONSERVER=''
|
|
|
|
|
1998-08-28 20:21:04 +00:00
|
|
|
TEMPBASE=mkhowto-$LOGNAME-$$
|
|
|
|
|
1998-04-02 15:37:13 +00:00
|
|
|
L2H_INIT_FILE=$TOPDIR/perl/l2hinit.perl
|
1998-08-28 20:21:04 +00:00
|
|
|
L2H_AUX_INIT_FILE=/usr/tmp/$TEMPBASE.perl
|
1998-04-02 15:37:13 +00:00
|
|
|
|
1998-08-28 20:21:04 +00:00
|
|
|
LOGFILE=/usr/tmp/$TEMPBASE.how
|
1998-03-11 15:33:44 +00:00
|
|
|
LOGGING=''
|
|
|
|
|
1998-03-10 23:23:05 +00:00
|
|
|
usage() {
|
1998-04-02 15:37:13 +00:00
|
|
|
MYNAME=`basename $0`
|
|
|
|
cat <<EOF
|
1998-10-19 19:14:42 +00:00
|
|
|
usage: $MYNAME [options...] file ...
|
1998-04-02 15:37:13 +00:00
|
|
|
|
|
|
|
Options specifying formats to build:
|
|
|
|
--html HyperText Markup Language
|
|
|
|
--pdf Portable Document Format (default)
|
|
|
|
--ps PostScript
|
|
|
|
--dvi "DeVice Indepentent" format from TeX
|
1998-10-19 19:14:42 +00:00
|
|
|
--text ASCII text (requires lynx)
|
1998-04-02 15:37:13 +00:00
|
|
|
|
1998-08-12 18:07:51 +00:00
|
|
|
More than one output format may be specified, or --all.
|
1998-04-02 15:37:13 +00:00
|
|
|
|
|
|
|
HTML options:
|
|
|
|
--address, -a Specify an address for page footers.
|
1998-04-24 21:57:12 +00:00
|
|
|
--link Specify the number of levels to include on each page.
|
1998-10-07 16:46:54 +00:00
|
|
|
--split, -s Specify a section level for page splitting, default: $MAX_SPLIT_DEPTH.
|
1998-08-05 04:48:18 +00:00
|
|
|
--iconserver, -i Specify location of icons (default: ../).
|
1998-04-02 15:37:13 +00:00
|
|
|
|
|
|
|
Other options:
|
1998-05-11 19:04:56 +00:00
|
|
|
--a4 Format for A4 paper.
|
1998-05-11 20:40:24 +00:00
|
|
|
--letter Format for US letter paper (the default).
|
1998-04-02 15:37:13 +00:00
|
|
|
--help, -H Show this text.
|
|
|
|
--logging, -l Log stdout and stderr to a file (*.how).
|
|
|
|
--debugging, -D Echo commands as they are executed.
|
|
|
|
--keep, -k Keep temporary files around.
|
|
|
|
--quiet, -q Do not print command output to stdout.
|
|
|
|
(stderr is also lost, sorry; see *.how for errors)
|
|
|
|
|
|
|
|
EOF
|
1998-08-12 18:07:51 +00:00
|
|
|
if [ "$2" ] ; then
|
|
|
|
echo "$2"
|
|
|
|
echo
|
|
|
|
fi
|
1998-04-02 15:37:13 +00:00
|
|
|
exit $1
|
1998-03-10 23:23:05 +00:00
|
|
|
}
|
|
|
|
|
1998-04-24 21:57:12 +00:00
|
|
|
# These are LaTeX2HTML controls; they reflect l2h variables of the same name.
|
|
|
|
# The values here are the defaults after modification by perl/l2hinit.perl.
|
|
|
|
#
|
|
|
|
ADDRESS=''
|
|
|
|
MAX_LINK_DEPTH=3
|
1998-10-07 16:46:54 +00:00
|
|
|
MAX_SPLIT_DEPTH=6
|
1998-04-24 21:57:12 +00:00
|
|
|
|
1998-03-10 23:23:05 +00:00
|
|
|
build_html() {
|
1998-05-07 21:20:39 +00:00
|
|
|
TEXFILE=`kpsewhich $1.tex`
|
1998-10-16 17:34:34 +00:00
|
|
|
TEXFILE="${TEXFILE#./}"
|
1998-08-06 20:15:20 +00:00
|
|
|
BUILDDIR=${2:-$1}
|
1998-08-05 04:48:18 +00:00
|
|
|
latex2html \
|
|
|
|
-init_file $L2H_INIT_FILE \
|
|
|
|
-init_file $L2H_AUX_INIT_FILE \
|
1998-08-06 20:15:20 +00:00
|
|
|
-dir $BUILDDIR $TEXFILE || exit $?
|
1999-02-16 20:43:53 +00:00
|
|
|
cp $TOPDIR/html/style.css $BUILDDIR/$1.css
|
1998-04-24 21:57:12 +00:00
|
|
|
if [ "$MAX_SPLIT_DEPTH" -ne 1 ] ; then
|
1998-08-06 20:15:20 +00:00
|
|
|
(cd $BUILDDIR; $MYDIR/node2label.pl *.html) || exit $?
|
1998-03-10 23:23:05 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
1998-04-17 02:52:12 +00:00
|
|
|
use_latex() {
|
|
|
|
# two args: <file> <latextype>
|
|
|
|
MYFILE=$1
|
|
|
|
MYLATEX=$2
|
|
|
|
#
|
|
|
|
# We really have to do it three times to get all the page numbers right,
|
|
|
|
# since the length of the ToC makes a real difference.
|
|
|
|
#
|
|
|
|
$MYDIR/newind.py >$MYFILE.ind
|
|
|
|
$MYDIR/newind.py modindex >mod$MYFILE.ind
|
|
|
|
$MYLATEX $MYFILE || exit $?
|
|
|
|
if [ -f mod$MYFILE.idx ] ; then
|
|
|
|
makeindex mod$MYFILE.idx
|
|
|
|
fi
|
|
|
|
if [ -f $MYFILE.idx ] ; then
|
|
|
|
$MYDIR/fix_hack $MYFILE.idx
|
|
|
|
makeindex $MYFILE.idx
|
|
|
|
$MYDIR/indfix.py $MYFILE.ind
|
|
|
|
fi
|
1998-10-27 21:59:03 +00:00
|
|
|
if [ `grep -c '^\\\\bibdata{' $MYFILE.aux` -ne 0 ] ; then
|
|
|
|
USE_BIBTEX=true
|
|
|
|
bibtex $MYFILE
|
|
|
|
else
|
|
|
|
USE_BIBTEX=''
|
|
|
|
fi
|
1998-07-23 19:13:52 +00:00
|
|
|
if [ -f $MYFILE.syn ] ; then
|
|
|
|
# This hack is due to a bug with the module synopsis support that
|
|
|
|
# causes the last module synopsis to be written out twice in
|
|
|
|
# howto documents (not present for manuals). Repeated below.
|
|
|
|
uniq $MYFILE.syn >TEMP.syn && mv TEMP.syn $MYFILE.syn || exit $?
|
|
|
|
fi
|
1998-04-17 02:52:12 +00:00
|
|
|
$MYLATEX $MYFILE || exit $?
|
|
|
|
if [ -f mod$MYFILE.idx ] ; then
|
|
|
|
makeindex mod$MYFILE.idx
|
1998-03-10 23:23:05 +00:00
|
|
|
fi
|
1998-04-17 02:52:12 +00:00
|
|
|
if [ -f $MYFILE.idx ] ; then
|
|
|
|
$MYDIR/fix_hack $MYFILE.idx || exit $?
|
1998-10-19 21:48:05 +00:00
|
|
|
makeindex -s $TOPDIR/texinputs/python.ist $MYFILE.idx || exit $?
|
1998-04-17 02:52:12 +00:00
|
|
|
fi
|
1998-05-14 20:03:14 +00:00
|
|
|
if [ -f $MYFILE.toc -a $MYLATEX = pdflatex ] ; then
|
1998-04-17 02:52:12 +00:00
|
|
|
$MYDIR/toc2bkm.py -c section $MYFILE
|
|
|
|
fi
|
1998-07-23 19:13:52 +00:00
|
|
|
if [ -f $MYFILE.syn ] ; then
|
|
|
|
uniq $MYFILE.syn >TEMP.syn && mv TEMP.syn $MYFILE.syn || exit $?
|
|
|
|
fi
|
1998-10-27 21:59:03 +00:00
|
|
|
if [ "$USE_BIBTEX" ] ; then
|
|
|
|
bibtex $MYFILE
|
|
|
|
fi
|
1998-04-17 02:52:12 +00:00
|
|
|
$MYLATEX $MYFILE || exit $?
|
1998-03-10 23:23:05 +00:00
|
|
|
}
|
|
|
|
|
1998-04-17 02:52:12 +00:00
|
|
|
build_dvi() {
|
|
|
|
use_latex $1 latex
|
1998-03-10 23:23:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build_pdf() {
|
1998-04-17 02:52:12 +00:00
|
|
|
use_latex $1 pdflatex
|
|
|
|
}
|
|
|
|
|
|
|
|
build_ps() {
|
1998-04-17 20:06:16 +00:00
|
|
|
dvips -N0 -o $1.ps $1 || exit $?
|
1998-04-17 02:52:12 +00:00
|
|
|
}
|
|
|
|
|
1998-08-06 20:15:20 +00:00
|
|
|
build_text() {
|
|
|
|
lynx -nolist -dump $2/index.html >$1.txt
|
|
|
|
}
|
|
|
|
|
1998-08-05 04:48:18 +00:00
|
|
|
l2hoption() {
|
|
|
|
if [ "$2" ] ; then
|
1998-11-30 20:30:26 +00:00
|
|
|
VALUE=`echo "$2" | sed 's/[$"@]/\\\\&/g'`
|
|
|
|
echo "\$$1 = \"$VALUE\";" >>$L2H_AUX_INIT_FILE
|
1998-08-05 04:48:18 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
1998-04-17 02:52:12 +00:00
|
|
|
cleanup() {
|
1998-07-23 19:13:52 +00:00
|
|
|
rm -f $1.aux $1.log $1.out $1.toc $1.bkm $1.idx $1.ilg $1.ind $1.syn
|
1998-04-29 21:28:25 +00:00
|
|
|
rm -f mod$1.idx mod$1.ilg mod$1.ind
|
1998-04-17 02:52:12 +00:00
|
|
|
if [ ! "$BUILD_DVI" ] ; then
|
1998-05-07 21:20:39 +00:00
|
|
|
rm -f $1.dvi
|
1998-03-10 23:23:05 +00:00
|
|
|
fi
|
1998-08-06 20:15:20 +00:00
|
|
|
rm -rf $1.temp-html
|
1998-05-15 17:13:08 +00:00
|
|
|
rm -f $1/IMG* $1/*.pl $1/WARNINGS $1/index.dat $1/modindex.dat
|
1998-10-27 21:59:03 +00:00
|
|
|
# bibtex stuff
|
|
|
|
rm -f $1.bbl $1.blg
|
1998-03-10 23:23:05 +00:00
|
|
|
}
|
|
|
|
|
1998-08-28 20:21:04 +00:00
|
|
|
parse_option() {
|
|
|
|
# When using a long option with a parameter separated by '=',
|
|
|
|
# generalize the parsing of the two:
|
|
|
|
OPTION="$1"
|
|
|
|
unset VALUE
|
|
|
|
STUFF=`echo "$1" | grep '^--[-a-zA-Z0-9]*='`
|
|
|
|
if [ "$STUFF" ] ; then
|
|
|
|
# This leaves OPTION=--option= and VALUE=value
|
|
|
|
OPTION=`echo "$STUFF" | sed 's/^\(--[-a-zA-Z0-9]*=\)\(.*\)$/\1/'`
|
|
|
|
VALUE=`echo "$STUFF" | sed 's/^\(--[-a-zA-Z0-9]*=\)\(.*\)$/\2/'`
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
1998-03-10 23:23:05 +00:00
|
|
|
# figure out what our targets are:
|
|
|
|
while [ "$1" ] ; do
|
1998-08-28 20:21:04 +00:00
|
|
|
parse_option "$1"
|
|
|
|
case "$OPTION" in
|
1998-08-12 18:07:51 +00:00
|
|
|
--all|--al)
|
|
|
|
BUILD_PDF=true
|
|
|
|
BUILD_PS=true
|
|
|
|
BUILD_DVI=true
|
|
|
|
BUILD_HTML=true
|
|
|
|
BUILD_TEXT=true
|
|
|
|
USE_DEFAULT_FORMAT=false
|
|
|
|
shift 1
|
|
|
|
;;
|
1998-03-10 23:23:05 +00:00
|
|
|
--pdf|--pd)
|
|
|
|
BUILD_PDF=true
|
|
|
|
USE_DEFAULT_FORMAT=false
|
|
|
|
shift 1
|
|
|
|
;;
|
1998-04-24 21:57:12 +00:00
|
|
|
--ps|--postscript|--postscrip|--postscri|--postscr|--postsc|--posts|--post|--pos|--po)
|
1998-03-10 23:23:05 +00:00
|
|
|
BUILD_PS=true
|
|
|
|
USE_DEFAULT_FORMAT=false
|
|
|
|
shift 1
|
|
|
|
;;
|
|
|
|
--dvi|--dv|--d)
|
|
|
|
BUILD_DVI=true
|
|
|
|
USE_DEFAULT_FORMAT=false
|
|
|
|
shift 1
|
|
|
|
;;
|
1998-04-02 15:37:13 +00:00
|
|
|
--html|--htm|--ht)
|
1998-03-10 23:23:05 +00:00
|
|
|
BUILD_HTML=true
|
|
|
|
USE_DEFAULT_FORMAT=false
|
|
|
|
shift 1
|
|
|
|
;;
|
1998-08-06 20:15:20 +00:00
|
|
|
--text|--tex|--te|--t)
|
|
|
|
BUILD_TEXT=true
|
|
|
|
USE_DEFAULT_FORMAT=false
|
|
|
|
shift 1
|
|
|
|
;;
|
1998-04-02 15:37:13 +00:00
|
|
|
-H|--help|--hel|--he)
|
|
|
|
usage 0
|
|
|
|
;;
|
1998-08-05 04:48:18 +00:00
|
|
|
-i|--iconserver|--iconserve|--iconserv|--iconser|--iconse|--icons|--icon|--ico|--ic|--i)
|
|
|
|
ICONSERVER="$2"
|
|
|
|
shift 2
|
|
|
|
;;
|
1998-08-28 20:21:04 +00:00
|
|
|
--iconserver=*|--iconserve=*|--iconserv=*|--iconser=*|--iconse=*|--icons=*|--icon=*|--ico=*|--ic=*|--i=*)
|
|
|
|
ICONSERVER="$VALUE"
|
|
|
|
shift 1
|
|
|
|
;;
|
1998-05-11 19:04:06 +00:00
|
|
|
-a|--address|--addres|--addre|-addr|--add|--ad)
|
1998-03-10 23:23:05 +00:00
|
|
|
ADDRESS="$2"
|
|
|
|
shift 2
|
|
|
|
;;
|
1998-08-28 20:21:04 +00:00
|
|
|
--address=*|--addres=*|--addre=*|-addr=*|--add=*|--ad=*)
|
|
|
|
ADDRESS="$VALUE"
|
|
|
|
shift 1
|
|
|
|
;;
|
1998-05-11 19:04:06 +00:00
|
|
|
--a4)
|
|
|
|
TEXINPUTS=$TOPDIR/paper-a4:$TEXINPUTS
|
|
|
|
shift 1
|
|
|
|
;;
|
1999-02-15 16:27:42 +00:00
|
|
|
--l2h-config|--l2h-confi|--l2h-conf|--l2h-con|--l2h-co|--l2h-c|--l2h-|--l2h|--l2)
|
|
|
|
CONFIG_FILES="$CONFIG_FILES $2"
|
|
|
|
shift 2
|
|
|
|
;;
|
1998-05-11 20:40:24 +00:00
|
|
|
--letter|--lette|--lett|--let|--le)
|
|
|
|
shift 1
|
|
|
|
;;
|
1998-04-24 21:57:12 +00:00
|
|
|
--link|--lin|--li)
|
|
|
|
LINK="$2"
|
|
|
|
shift 2
|
|
|
|
;;
|
1998-08-28 20:21:04 +00:00
|
|
|
--link=*|--lin=*|--li=*)
|
|
|
|
LINK="$VALUE"
|
|
|
|
shift 1
|
|
|
|
;;
|
1998-04-02 15:37:13 +00:00
|
|
|
-s|--split|--spli|--spl|--sp|--s)
|
1998-04-24 21:57:12 +00:00
|
|
|
MAX_SPLIT_DEPTH="$2"
|
1998-04-02 15:37:13 +00:00
|
|
|
shift 2
|
|
|
|
;;
|
1998-08-28 20:21:04 +00:00
|
|
|
--split=|--spli=|--spl=|--sp=|--s=)
|
|
|
|
MAX_SPLIT_DEPTH="$VALUE"
|
|
|
|
shift 1
|
|
|
|
;;
|
1998-04-24 21:57:12 +00:00
|
|
|
-l|--logging|--loggin|--loggi|--logg|--log|--lo)
|
1998-03-11 15:33:44 +00:00
|
|
|
LOGGING=true
|
|
|
|
shift 1
|
|
|
|
;;
|
|
|
|
-D|--debugging|--debuggin|--debuggi|--debugg|--debug|--debu|--deb|--de)
|
|
|
|
DEBUGGING=true
|
|
|
|
shift 1
|
|
|
|
;;
|
|
|
|
-k|--keep|--kee|--ke|--k)
|
|
|
|
DISCARD_TEMPS=''
|
|
|
|
shift 1
|
|
|
|
;;
|
1998-04-02 15:37:13 +00:00
|
|
|
-q|--quiet|--quie|--qui|--qu|--q)
|
1998-03-11 15:41:21 +00:00
|
|
|
QUIET=true
|
|
|
|
shift 1
|
|
|
|
;;
|
1998-04-24 21:57:12 +00:00
|
|
|
--)
|
1998-04-29 21:28:25 +00:00
|
|
|
shift 1
|
1998-04-24 21:57:12 +00:00
|
|
|
break
|
|
|
|
;;
|
1998-03-10 23:23:05 +00:00
|
|
|
-*)
|
1998-08-28 20:21:04 +00:00
|
|
|
usage 2 "Unknown option: ${VALUE%=}"
|
1998-03-10 23:23:05 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
break;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ $# = 0 ] ; then
|
1998-08-06 20:15:20 +00:00
|
|
|
# check for a single .tex file in .
|
|
|
|
COUNT=`ls -1 *.tex | wc -l | sed 's/[ ]//g'`
|
|
|
|
if [ "$COUNT" -eq 1 ] ; then
|
|
|
|
set -- `ls -1 *.tex`
|
1998-08-12 18:07:51 +00:00
|
|
|
elif [ "$COUNT" -gt 1 ] ; then
|
|
|
|
usage 2 "Could not deduce which file(s) to process as HOWTO documents."
|
1998-08-06 20:15:20 +00:00
|
|
|
else
|
1998-08-12 18:07:51 +00:00
|
|
|
usage 2 "No file to process."
|
1998-08-06 20:15:20 +00:00
|
|
|
fi
|
1998-03-10 23:23:05 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $USE_DEFAULT_FORMAT = true ] ; then
|
|
|
|
eval "BUILD_$DEFAULT_FORMAT=true"
|
|
|
|
fi
|
|
|
|
|
1998-03-11 15:41:21 +00:00
|
|
|
if [ "$QUIET" ] ; then
|
|
|
|
exec >/dev/null
|
|
|
|
fi
|
|
|
|
|
1998-08-06 20:15:20 +00:00
|
|
|
if [ "$DEBUGGING" ] ; then
|
|
|
|
set -x
|
|
|
|
fi
|
|
|
|
|
1998-08-05 04:48:18 +00:00
|
|
|
echo '# auxillary init file for latex2html' >$L2H_AUX_INIT_FILE
|
1998-10-19 19:14:42 +00:00
|
|
|
echo '# generated by mkhowto.sh -- do not edit' >>$L2H_AUX_INIT_FILE
|
1999-02-15 16:27:42 +00:00
|
|
|
for FILE in XXX $CONFIG_FILES ; do
|
|
|
|
if [ ! "$FILE" = XXX ] ; then
|
|
|
|
cat >>$L2H_AUX_INIT_FILE $FILE
|
|
|
|
cat >>$L2H_AUX_INIT_FILE <<EOF
|
|
|
|
|
|
|
|
print "\\ninitializing from file: $FILE";
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
done
|
1998-08-28 20:21:04 +00:00
|
|
|
if [ "$ICONSERVER" ] ; then
|
|
|
|
ICONSERVER="${ICONSERVER%/}"
|
|
|
|
fi
|
1998-08-05 04:48:18 +00:00
|
|
|
l2hoption ICONSERVER "$ICONSERVER"
|
|
|
|
l2hoption ADDRESS "$ADDRESS"
|
|
|
|
l2hoption MAX_LINK_DEPTH "$MAX_LINK_DEPTH"
|
|
|
|
l2hoption MAX_SPLIT_DEPTH "$MAX_SPLIT_DEPTH"
|
|
|
|
echo '1;' >>$L2H_AUX_INIT_FILE
|
1998-05-14 20:03:14 +00:00
|
|
|
|
1998-03-10 23:23:05 +00:00
|
|
|
for FILE in $@ ; do
|
1998-05-14 20:36:49 +00:00
|
|
|
FILEDIR=`dirname $FILE`
|
1998-08-28 20:21:04 +00:00
|
|
|
FILE=`basename $FILE .tex`
|
1998-05-14 20:03:14 +00:00
|
|
|
#
|
|
|
|
# Put the directory the .tex file is in is also the first directory in
|
|
|
|
# TEXINPUTS, to allow files there to override files in the common area.
|
|
|
|
#
|
1998-08-05 04:48:18 +00:00
|
|
|
TEXINPUTS=$FILEDIR:$TOPDIR/texinputs:$TEXINPUTS
|
1998-05-14 20:03:14 +00:00
|
|
|
export TEXINPUTS
|
|
|
|
#
|
1998-03-10 23:23:05 +00:00
|
|
|
if [ "$BUILD_DVI" -o "$BUILD_PS" ] ; then
|
1998-03-11 15:33:44 +00:00
|
|
|
build_dvi $FILE 2>&1 | tee -a $LOGFILE
|
1998-08-06 20:15:20 +00:00
|
|
|
HAVE_TEMPS=true
|
1998-03-10 23:23:05 +00:00
|
|
|
fi
|
|
|
|
if [ "$BUILD_PDF" ] ; then
|
1998-03-11 15:33:44 +00:00
|
|
|
build_pdf $FILE 2>&1 | tee -a $LOGFILE
|
1998-08-06 20:15:20 +00:00
|
|
|
HAVE_TEMPS=true
|
1998-03-10 23:23:05 +00:00
|
|
|
fi
|
|
|
|
if [ "$BUILD_PS" ] ; then
|
1998-03-11 15:33:44 +00:00
|
|
|
build_ps $FILE 2>&1 | tee -a $LOGFILE
|
1998-03-10 23:23:05 +00:00
|
|
|
fi
|
|
|
|
if [ "$BUILD_HTML" ] ; then
|
1998-08-06 20:15:20 +00:00
|
|
|
if [ ! "$HAVE_TEMPS" ] ; then
|
|
|
|
# need to get aux file
|
|
|
|
build_dvi $FILE 2>&1 | tee -a $LOGFILE
|
|
|
|
HAVE_TEMPS=true
|
|
|
|
fi
|
|
|
|
build_html $FILE $FILE 2>&1 | tee -a $LOGFILE
|
1998-10-19 19:14:42 +00:00
|
|
|
if [ "$ICONSERVER" = "." ] ; then
|
|
|
|
cp $TOPDIR/icons/*.gif $FILE/
|
|
|
|
fi
|
1998-08-06 20:15:20 +00:00
|
|
|
fi
|
|
|
|
if [ "$BUILD_TEXT" ] ; then
|
|
|
|
if [ ! "$HAVE_TEMPS" ] ; then
|
1998-03-10 23:23:05 +00:00
|
|
|
# need to get aux file
|
1998-03-11 15:33:44 +00:00
|
|
|
build_dvi $FILE 2>&1 | tee -a $LOGFILE
|
1998-08-06 20:15:20 +00:00
|
|
|
HAVE_TEMPS=true
|
1998-03-11 15:33:44 +00:00
|
|
|
fi
|
1998-08-06 20:15:20 +00:00
|
|
|
# this is why building text really has to be last:
|
|
|
|
if [ "$MAX_SPLIT_DEPTH" -ne 1 ] ; then
|
|
|
|
echo '# re-hack this file for --text:' >>$L2H_AUX_INIT_FILE
|
|
|
|
l2hoption MAX_SPLIT_DEPTH 1
|
|
|
|
echo '1;' >>$L2H_AUX_INIT_FILE
|
|
|
|
TEMPDIR=$FILE.temp-html
|
|
|
|
build_html $FILE $TEMPDIR 2>&1 | tee -a $LOGFILE
|
|
|
|
else
|
|
|
|
TEMPDIR=$FILE
|
|
|
|
fi
|
|
|
|
build_text $FILE $TEMPDIR 2>&1 | tee -a $LOGFILE
|
1998-03-11 15:33:44 +00:00
|
|
|
fi
|
1998-08-06 20:15:20 +00:00
|
|
|
|
1998-03-11 15:33:44 +00:00
|
|
|
if [ "$DISCARD_TEMPS" ] ; then
|
1998-04-17 02:52:12 +00:00
|
|
|
cleanup $FILE 2>&1 | tee -a $LOGFILE
|
1998-03-10 23:23:05 +00:00
|
|
|
fi
|
1998-04-17 02:52:12 +00:00
|
|
|
# keep the logfile around
|
1998-03-11 15:33:44 +00:00
|
|
|
if [ "$LOGGING" ] ; then
|
|
|
|
cp $LOGFILE $FILE.how
|
1998-03-10 23:23:05 +00:00
|
|
|
fi
|
1998-03-11 15:33:44 +00:00
|
|
|
rm -f $LOGFILE
|
1998-03-10 23:23:05 +00:00
|
|
|
done
|
1998-08-05 04:48:18 +00:00
|
|
|
|
1998-10-07 16:41:40 +00:00
|
|
|
if [ ! "$DEBUGGING" ] ; then
|
|
|
|
rm -f $L2H_AUX_INIT_FILE
|
|
|
|
fi
|