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
commitb25706e098b502b4b2a6c5d60eb827650a37055b
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>
dateTue 9 Jan 2007, 06:38 (20 years ago)
parent8adb142
src/wrappers/markdown2pdf.in+6−4
@@ -50,11 +50,13 @@ fi
5050 if [ $runs -lt 3 ] &&
5151 grep -q "LaTeX Warning: There were undefined references." $texname.log; then
5252 runs=$(($runs + 1))
53− if grep -q "LaTeX Warning:.*[Cc]itation" $texname.log &&
54− ! bibtex $texname >/dev/null 2>&1 >bibtex.err; then
53+ if grep -q "LaTeX Warning:.*[Cc]itation" $texname.log; then
54+ bibtex $texname 2>&1 >bibtex.err
5555 if [ $runs -gt 2 ]; then
56− err "${THIS}: bibtex warning messages:"
57− cat bibtex.err >&2
56+ if grep -q "error message" bibtex.err ||
57+ grep -q "Warning" bibtex.err; then
58+ cat bibtex.err >&2
59+ fi
5860 fi
5961 fi
6062 else