]> granicus.if.org Git - python/commitdiff
Support the use of bibtex. This is transparent to the user.
authorFred Drake <fdrake@acm.org>
Tue, 27 Oct 1998 21:59:03 +0000 (21:59 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 27 Oct 1998 21:59:03 +0000 (21:59 +0000)
Switch from bash to ksh, in the hope that more systems support it (one
report of a site without an available bash).

Doc/tools/mkhowto.sh

index 8fadb032d164c2ba65e3eca68c64aedf86fc6ea0..cd85ef078c263d19f54df36fd5c75f5042329aa3 100755 (executable)
@@ -1,4 +1,4 @@
-#! /usr/bin/env bash
+#! /usr/bin/env ksh
 
 # 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
@@ -107,6 +107,12 @@ use_latex() {
        makeindex $MYFILE.idx
        $MYDIR/indfix.py $MYFILE.ind
     fi
+    if [ `grep -c '^\\\\bibdata{' $MYFILE.aux` -ne 0 ] ; then
+       USE_BIBTEX=true
+       bibtex $MYFILE
+    else
+       USE_BIBTEX=''
+    fi
     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
@@ -127,6 +133,9 @@ use_latex() {
     if [ -f $MYFILE.syn ] ; then
        uniq $MYFILE.syn >TEMP.syn && mv TEMP.syn $MYFILE.syn || exit $?
     fi
+    if [ "$USE_BIBTEX" ] ; then
+       bibtex $MYFILE
+    fi
     $MYLATEX $MYFILE || exit $?
 }
 
@@ -160,6 +169,8 @@ cleanup() {
     fi
     rm -rf $1.temp-html
     rm -f $1/IMG* $1/*.pl $1/WARNINGS $1/index.dat $1/modindex.dat
+    # bibtex stuff
+    rm -f $1.bbl $1.blg
 }
 
 parse_option() {