Commit | Line | Data |
---|---|---|
32609df3 MW |
1 | #! /bin/sh |
2 | ||
aa9e8d36 | 3 | set -ex |
32609df3 MW |
4 | jobname=$1 opts=$2 file=$3 preamble=$4 |
5 | ||
6 | case ",$opts," in | |
7 | *,pdf,*) tex=pdflatex ext=pdf;; | |
8 | *) tex=latex ext=dvi;; | |
9 | esac | |
10 | ||
11 | for i in toc lot lof aux ind idx ilg bbl blg log; do | |
12 | rm -f "$jobname".$i | |
13 | done | |
14 | ||
15 | $tex -jobname "$jobname" "\\relax $preamble \\input $file" | |
bb06fa14 | 16 | case ",$opts," in *,bibtex,*) bibtex "$jobname".aux || :;; esac |
32609df3 MW |
17 | $tex -jobname "$jobname" "\\relax $preamble \\input $file" |
18 | $tex -jobname "$jobname" "\\relax $preamble \\input $file" | |
19 | case ",$opts," in | |
20 | *,index=*,*) | |
21 | ist=$(echo "$opts" | sed 's:.*,index=\([^,]*\),.*$:\1:') | |
22 | makeindex -s"$ist" "$jobname".idx | |
23 | ;; | |
24 | esac | |
25 | $tex -jobname "$jobname" "\\relax $preamble \\input $file" | |
26 | ||
27 | echo timestamp >"$jobname".$ext-stamp |