compile.sh 707 Bytes
Newer Older
Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
1
#!/bin/bash
2 3 4

# Pour compiler tous les fichiers sources du dépot:

5 6 7 8
#find . -name "main.tex" -execdir sh -c "pwd  && latexmk -e '$pdflatex=q/pdflatex %O -shell-escape %S/' -pdf {} -quiet| grep Latexmk" \;

# 3 compilation nécessaire pour obtenir un résultat stable
find . -name "main.tex" -execdir sh -c "pwd  && pdflatex -shell-escape -interaction=batchmode {} &&pdflatex -shell-escape -interaction=batchmode {}&&pdflatex -shell-escape -interaction=batchmode {}" \;
Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
9

Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
10 11
mkdir "public"
for i in `find . -maxdepth 1 -type d -regex \.\/[0-9].*?`;do
Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
12
    cp -f $i/Cours/main.pdf ./public/${i:2}.pdf;
Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
13
done;
Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
14
#clean up :
Pierre-antoine Comby's avatar
Pierre-antoine Comby committed
15
shopt -s globstar
16
rm -f **/*.aux **/*.log **/*.out **/*.fls **/*.fdb_latexmk **/*.toc **/*.pyg