forked from andygrunwald/FOM-LaTeX-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile.sh
executable file
·41 lines (35 loc) · 894 Bytes
/
compile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
#Run the Script from the folder you are in...
CURRENT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
pdflatex "$CURRENT_DIR/thesis_main.tex"
RETVAL="$?"
if [[ "${RETVAL}" -ne 0 ]] ; then
echo "First pdflatex run failed"
exit ${RETVAL}
fi
makeindex thesis_main.nlo -s nomencl.ist -o thesis_main.nls
RETVAL="$?"
if [[ "${RETVAL}" -ne 0 ]] ; then
echo "makeindex run failed"
exit ${RETVAL}
fi
biber "$CURRENT_DIR/thesis_main"
RETVAL="$?"
if [[ "${RETVAL}" -ne 0 ]] ; then
echo "biber run failed"
exit ${RETVAL}
fi
pdflatex "$CURRENT_DIR/thesis_main.tex"
RETVAL="$?"
if [[ "${RETVAL}" -ne 0 ]] ; then
echo "Second pdflatex run failed"
exit ${RETVAL}
fi
pdflatex "$CURRENT_DIR/thesis_main.tex"
RETVAL="$?"
if [[ "${RETVAL}" -ne 0 ]] ; then
echo "Third pdflatex run failed"
exit ${RETVAL}
fi
echo "PDF Compile: Success"
exit 0