MA0301/generate_pdfs.sh

22 lines
411 B
Bash
Executable File

#!/bin/bash
mkdir -p public
for file in $(find -name main.tex)
do
cd $(dirname $file)
pdflatex \
-interaction nonstopmode \
-halt-on-error \
-output-directory ../public \
-jobname=$(dirname $file | cut -c 3-) \
$(basename $file)
cd ..
done
pushd exam_template_graphics
make
make
mv main.pdf ../public/exam_template_graphics.pdf
popd
find public -type f ! -name '*.pdf' -delete