summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/bosisio/makedoc
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/bosisio/makedoc')
-rw-r--r--Master/texmf-dist/doc/latex/bosisio/makedoc110
1 files changed, 52 insertions, 58 deletions
diff --git a/Master/texmf-dist/doc/latex/bosisio/makedoc b/Master/texmf-dist/doc/latex/bosisio/makedoc
index dfebbcaa5a5..c0df8793926 100644
--- a/Master/texmf-dist/doc/latex/bosisio/makedoc
+++ b/Master/texmf-dist/doc/latex/bosisio/makedoc
@@ -1,12 +1,17 @@
- #########################################################
- # #
- # FILE makedoc #
- # #
- # Copyright(C) by F. Bosisio, 6 September 1997 #
- # #
- # E-mail: bosisio@mate.polimi.it #
- # #
- #########################################################
+#!/bin/sh
+
+# + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+# | Copyright(C) 1997-2005 by F. Bosisio |
+# | |
+# | This program can be redistributed and/or modified under |
+# | the terms of the LaTeX Project Public License, distributed |
+# | from CTAN archives in directory macros/latex/base/lppl.txt; |
+# | either version 1 of the License, or any later version. |
+# | |
+# | E-mail: fbosisio@bigfoot.com |
+# | CTAN location: macros/latex/contrib/bosisio/ |
+# + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+
#
# If there isn't a command-line parameter, ask for a filename
#
@@ -14,90 +19,79 @@ if test $1
then
FILE=$1
else
- echo ' Insert the filename you want to process with makedoc'
- read
- FILE=$REPLY
+ printf '\tInsert the filename you want to process with makedoc\n'
+ read FILE
fi
#
# Strip the ".dtx" extension (if present) and check that the file exists
#
-FILE=`basename $FILE .dtx`
-test -f $FILE.dtx || exit
+FILE=`basename ${FILE} .dtx`
+test -f ${FILE}.dtx || exit 1
#
# Run LaTeX on the ".dtx" file to generate the ".sty" and ".drv" files
#
-echo
-echo " Running LaTeX on $FILE.dtx ..."
-echo
-latex $FILE.dtx || exit
+printf '\n\t\tRunning LaTeX on %s.dtx ...\n\n' "${FILE}"
+latex ${FILE}.dtx || exit 2
#
# Run LaTeX once to generate the ".aux", ".idx" and ".glo" files
#
-echo
-echo " Running LaTeX on $FILE.drv ..."
-echo
-latex $FILE.drv || exit
+printf '\n\t\tRunning LaTeX on %s.drv ...\n\n' "${FILE}"
+latex ${FILE}.drv || exit 3
#
# Run BibTeX to generate the bibliography file (".bbl")
#
-if grep bibdata $FILE.aux
+if grep -q bibdata ${FILE}.aux
then
- echo
- echo " Running BibTeX on $FILE.aux ..."
- echo
- bibtex $FILE || exit
- rm $FILE.blg
+ printf '\n\t\tRunning BibTeX on %s.aux ...\n\n' "${FILE}"
+ bibtex ${FILE} || exit 4
+ rm ${FILE}.blg
fi
#
# Run MakeIndex on the index file
#
-if test $FILE.idx
+if test ${FILE}.idx
then
- echo
- echo " Running MakeIndex on $FILE.idx ..."
- echo
- makeindex -s gind.ist -o $FILE.ind $FILE.idx || exit
- rm $FILE.ilg
+ printf '\n\t\tRunning MakeIndex on %s.idx ...\n\n' "${FILE}"
+ makeindex -s gind.ist -o ${FILE}.ind ${FILE}.idx || exit 5
+ rm ${FILE}.ilg
fi
#
# Run MakeIndex on the glossary file
#
-if test $FILE.glo
+if test ${FILE}.glo
then
- echo
- echo " Running MakeIndex on $FILE.glo ..."
- echo
- makeindex -s gglo.ist -o $FILE.gls $FILE.glo || exit
- rm $FILE.ilg
+ printf '\n\t\tRunning MakeIndex on %s.glo ...\n\n' "${FILE}"
+ makeindex -s gglo.ist -o ${FILE}.gls ${FILE}.glo || exit 6
+ rm ${FILE}.ilg
fi
#
# Rerun LaTeX to read the ".bbl", ".ind" and ".gls" files
#
-echo
-echo ' Re-running LaTeX on $FILE.drv ...'
-echo
-latex $FILE.drv
+printf '\n\t\tRe-running LaTeX on %s.drv ...\n\n' "${FILE}"
+latex ${FILE}.drv
#
# Rerun LaTeX again to get the cross-references right
#
-if grep "Rerun to get cross-references right" makedoc.log
+if grep -q 'Rerun to get cross-references right' ${FILE}.log
then
- echo
- echo ' Re-running LaTeX again on $FILE.drv ...'
- echo
- latex $FILE.drv
+ printf '\n\t\tRe-running LaTeX again on %s.drv ...\n\n' "${FILE}"
+ latex ${FILE}.drv
fi
-rm $FILE.drv $FILE.log $FILE.aux $FILE.ind $FILE.glo $FILE.bbl $FILE.idx $FILE.gls
+#
+# Remove temporary files
+#
+rm -f ${FILE}.drv ${FILE}.log ${FILE}.aux ${FILE}.ind ${FILE}.glo \
+ ${FILE}.bbl ${FILE}.idx ${FILE}.gls
#
# Show the generated output
#
-xdvi $FILE.dvi
+xdvi ${FILE}.dvi
#
-# Run DviPs to produce the postscript file
+# Run DviPdf to produce the PDF file
#
-echo
-echo ' Running DviPs ...'
-echo
-dvips $FILE.dvi
-rm $FILE.dvi
-
+printf '\n\t\tRunning DviPdf ...\n\n'
+dvipdf ${FILE}.dvi
+#
+# Remove DVI file
+#
+rm ${FILE}.dvi