diff options
author | Akira Yokosawa <akiyks@gmail.com> | 2016-11-03 08:28:35 +0900 |
---|---|---|
committer | Akira Yokosawa <akiyks@gmail.com> | 2016-11-04 20:20:12 +0900 |
commit | 7f3330f15be81034f1f3e2a15af711db4551ce91 (patch) | |
tree | 878243aaa5353eb53f056518fe57d33a91fbafb6 /utilities | |
parent | bebc538fe4ee24603936e31c981e5342f85b88e5 (diff) | |
download | perfbook-7f3330f15be81034f1f3e2a15af711db4551ce91.tar.gz |
runlatex.sh: Add a round for possible bib update
When there is an update in bib database without addition of entry,
no warning is output in "$basename.log" in the 1st run.
To prevent premature exit of "while" loop prematurely, this commit
adds 2nd round of "pdflatex" before the while loops.
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Diffstat (limited to 'utilities')
-rw-r--r-- | utilities/runlatex.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/utilities/runlatex.sh b/utilities/runlatex.sh index 33383f68..dca728c1 100644 --- a/utilities/runlatex.sh +++ b/utilities/runlatex.sh @@ -36,7 +36,6 @@ fi basename=`echo $1 | sed -e 's/\.tex$//'` -iter=1 if ! test -r $basename-first.log then echo "pdflatex 1 for $basename.pdf" @@ -49,6 +48,15 @@ then grep 'LaTex Warning:' $basename.log > $basename-warning.log fi rm -f $basename-first.log +iter=2 +echo "pdflatex 2 for $basename.pdf # for possible bib update" +pdflatex $basename > /dev/null 2>&1 < /dev/null || : +if grep -q '! Emergency stop.' $basename.log +then + echo "----- Fatal latex error, see $basename.log for details. -----" + exit 1 +fi +grep 'LaTex Warning:' $basename.log > $basename-warning.log while grep -q 'LaTeX Warning: There were undefined references' $basename.log do if test -r $basename-warning-prev.log |