forked from klausuren/klausuren-allgemein
Add option to delete compile helper files
- build_all.sh now asks you, if you want to delete the helper files (.aux, .log, etc) after compiling is done
This commit is contained in:
parent
a15eb8f41f
commit
d1a5ce9a45
13
build_all.sh
13
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user