aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-01-09 06:38:15 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-01-09 06:38:15 +0000
commitb25706e098b502b4b2a6c5d60eb827650a37055b (patch)
tree7578e5480c672a9573ddab7c1599fe69adfb2883
parent8adb142720f5c262fdf74c0f0101ec4087f6ee74 (diff)
downloadpandoc-b25706e098b502b4b2a6c5d60eb827650a37055b.tar.gz
Cleaned up markdown2pdf.in. Note that bibtex does not return
an error condition when it gives warnings, so instead we grep for warnings or error messages to see if we need to print the log. git-svn-id: https://pandoc.googlecode.com/svn/trunk@476 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--src/wrappers/markdown2pdf.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/wrappers/markdown2pdf.in b/src/wrappers/markdown2pdf.in
index 273c99a2e..16df2b9cd 100644
--- a/src/wrappers/markdown2pdf.in
+++ b/src/wrappers/markdown2pdf.in
@@ -50,11 +50,13 @@ fi
if [ $runs -lt 3 ] &&
grep -q "LaTeX Warning: There were undefined references." $texname.log; then
runs=$(($runs + 1))
- if grep -q "LaTeX Warning:.*[Cc]itation" $texname.log &&
- ! bibtex $texname >/dev/null 2>&1 >bibtex.err; then
+ if grep -q "LaTeX Warning:.*[Cc]itation" $texname.log; then
+ bibtex $texname 2>&1 >bibtex.err
if [ $runs -gt 2 ]; then
- err "${THIS}: bibtex warning messages:"
- cat bibtex.err >&2
+ if grep -q "error message" bibtex.err ||
+ grep -q "Warning" bibtex.err; then
+ cat bibtex.err >&2
+ fi
fi
fi
else