diff --git a/build_all.sh b/build_all.sh index 2fcac3b..31ef11c 100755 --- a/build_all.sh +++ b/build_all.sh @@ -1,5 +1,6 @@ #!/bin/bash +#compile all tex files except settings mkdir -p output find ./* -maxdepth 1 -mindepth 1 -type f -name "*.tex" \ -not -name "settings.tex" \ @@ -7,3 +8,15 @@ find ./* -maxdepth 1 -mindepth 1 -type f -name "*.tex" \ -not -name "klausuren-Settings-utf8.tex" \ -print0 | \ xargs -0 -P 4 -I [] bash -c 'cd "$(dirname "[]")"; latexmk -pdf -outdir=../output "$(basename "[]")";' + +echo "finished compiling" +#cleanup compile help files +read -p "Delete complile helping files (aux, log, ...)?" -n 1 -r + +if [[ $REPLY =~ ^[Yy]$ ]]; then + extensions="acn acr alg aux bbl bcf blg -blx.bib dvi fdb_latexmk fls glg glo gls idx ilg ind ist lof log lot maf mtc mtc0 nav nlo out pdfsync ps snm synctex.gz toc vrb xdy tdo .DS_Store" + + for ext in $extensions; do + find ./output -maxdepth 1 -mindepth 1 -type f -name "*.$ext" -delete + done +fi