-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile.sh
More file actions
executable file
·29 lines (26 loc) · 1.01 KB
/
Copy pathcompile.sh
File metadata and controls
executable file
·29 lines (26 loc) · 1.01 KB
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
# Auxiliary function used to handle submodules
gitSubmodule() {
if [ ! -d "configuration/myResources/Latex" ]; then
git submodule update --init --recursive
else
git submodule update --remote configuration/myResources
fi
}
# Auxiliary function used to compile dissertation
compileLatex() {
pdflatex $1.tex # Initial compile to generate .aux, .glo, .acn files
biber $1 # Run biber for bibliography
makeglossaries $1 # Process glossaries with makeglossaries
pdflatex $1.tex # Second compile to update references
pdflatex $1.tex # Final compile to ensure everything is in place
# Cleanup intermediate files
rm $1.aux $1.bbl $1.bcf $1.blg $1.glo* $1.gls* $1.ist $1.log $1.out $1.run.xml \
$1.slg $1.slo $1.sls $1.tdo $1.toc $1.glg* $1.lot $1.lof $1.dvi
}
cleanCopilation() {
# Remove everything except .tex and .pdf
find . -maxdepth 1 -type f \
-name "$1.*" ! -name "$1.tex" ! -name "$1.pdf" -delete
}
#gitSubmodule
compileLatex main