#!/bin/bash

git pull

/usr/bin/pdflatex -file-line-error -interaction nonstopmode -jobname=All4 All4.tex
/usr/bin/pdflatex -file-line-error -interaction nonstopmode -jobname=All4 All4.tex
rm All4.aux All4.out All4.toc
cp All4.pdf /home/david/fileshare/Anders/

/usr/bin/pdflatex -file-line-error -interaction nonstopmode -jobname=Book1 "book-1/Main.tex"
/usr/bin/pdflatex -file-line-error -interaction nonstopmode -jobname=Book1 "book-1/Main.tex"
rm Book1.aux Book1.out Book1.toc
cp Book1.pdf /home/david/fileshare/Anders/

/usr/bin/pdflatex -file-line-error -interaction nonstopmode -jobname=Book2 "book-2/Main.tex"
/usr/bin/pdflatex -file-line-error -interaction nonstopmode -jobname=Book2 "book-2/Main.tex"
rm Book2.aux Book2.out Book2.toc
cp Book2.pdf /home/david/fileshare/Anders/

/usr/bin/pdflatex -file-line-error -interaction nonstopmode -jobname=Book3 "book-3/Main.tex"
/usr/bin/pdflatex -file-line-error -interaction nonstopmode -jobname=Book3 "book-3/Main.tex"
rm Book3.aux Book3.out Book3.toc
cp Book3.pdf /home/david/fileshare/Anders/

/usr/bin/pdflatex -file-line-error -interaction nonstopmode -jobname=Book4 "book-4/Main.tex"
/usr/bin/pdflatex -file-line-error -interaction nonstopmode -jobname=Book4 "book-4/Main.tex"
rm Book4.aux Book4.out Book4.toc
cp Book4.pdf /home/david/fileshare/Anders/
