16 lines
309 B
Bash
16 lines
309 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
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
|
||
|
|
||
|
find public -type f ! -name '*.pdf' -delete
|