diff --git a/Jenkinsfile b/Jenkinsfile index a8ab8ac..a3cac0d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,6 +13,7 @@ pipeline { stage('Deploy') { steps{ echo 'Starting deploy step...' + sh 'cp assignments/main_text.pdf /var/www/zwietering.eu/pdfs/real_analysis.pdf' } } } diff --git a/README.md b/README.md index cdf07ce..5793073 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,6 @@ Exercises and maybe (just maybe, like, very probably not) lecture notes on the R [Course link](https://ocw.mit.edu/courses/18-100a-real-analysis-fall-2020/) -The text book is included in the directory root. The `.tex` files can be compiled individually in the corresponding subdirectories or collectively from the assignments directory. I use `pdflatex` with texlive on Arch (through WSL2, [check this guide](https://gist.github.com/ld100/3376435a4bb62ca0906b0cff9de4f94b) on how to do this (why use Ubuntu if you're only going to use the CLI right?)). \ No newline at end of file +The text book is included in the directory root. The `.tex` files can be compiled individually in the corresponding subdirectories or collectively from the assignments directory. I use `pdflatex` with texlive on Arch (through WSL2, [check this guide](https://gist.github.com/ld100/3376435a4bb62ca0906b0cff9de4f94b) on how to do this (why use Ubuntu if you're only going to use the CLI right?)). + +The complete generated PDF file can be downloaded from [this address](https://zwietering.eu/pdfs/real_analysis.pdf). \ No newline at end of file diff --git a/assignments/main_text.pdf b/assignments/main_text.pdf deleted file mode 100644 index 83d3b60..0000000 Binary files a/assignments/main_text.pdf and /dev/null differ diff --git a/assignments/week1/main.pdf b/assignments/week1/main.pdf deleted file mode 100644 index e5b5c1e..0000000 Binary files a/assignments/week1/main.pdf and /dev/null differ diff --git a/assignments/week2/main.pdf b/assignments/week2/main.pdf deleted file mode 100644 index 5d46ff4..0000000 Binary files a/assignments/week2/main.pdf and /dev/null differ diff --git a/assignments/week3/main.pdf b/assignments/week3/main.pdf deleted file mode 100644 index d551365..0000000 Binary files a/assignments/week3/main.pdf and /dev/null differ diff --git a/scripts/build.sh b/scripts/build.sh old mode 100644 new mode 100755 index aca7924..d74964f --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,23 +1,16 @@ #!/bin/bash -# Check if necessary packages are installed -necessary_packages=("pdflatex") - -for package in ${necessary_packages}; do - if ! [dpkg -l ${package} > /dev/null]; then - echo "Error: ${package} is not installed." - exit 1 - fi -done - # Build all directories subdirectory_file_name=main +cd assignments + for D in *; do - if [ -d "${D}" ]; then + if [ "${D}" != "template" ] && [ -d "${D}" ]; then echo "Building ${D}..." - cd ${D} - pdflatex -interaction=nonstopmode -halt-on-error ${subdirectory_file_name}.tex + cd "${D}" + pdflatex -interaction=batchmode -halt-on-error "${subdirectory_file_name}.tex" + pdflatex -interaction=batchmode -halt-on-error "${subdirectory_file_name}.tex" cd .. fi done @@ -26,7 +19,15 @@ done main_file_name=main_text echo "Building main PDF..." -pdflatex -interaction=nonstopmode -halt-on-error ${main_file_name}.tex +pdflatex -interaction=batchmode -halt-on-error "${main_file_name}.tex" +pdflatex -interaction=batchmode -halt-on-error "${main_file_name}.tex" # Clean up -rm -rf *.aux *.log *.out *.toc \ No newline at end of file +rm -rf *.aux *.log *.out *.toc +for D in *; do + if [ "${D}" != "template" ] && [ -d "${D}" ]; then + cd "${D}" + rm -rf *.aux *.log *.out *.toc + cd .. + fi +done \ No newline at end of file