fix: got teh ci/cd working
This commit is contained in:
parent
240b2ab9cf
commit
7ce5eb3fe5
3 changed files with 38 additions and 24 deletions
33
_scripts/format_constitution.sh
Executable file
33
_scripts/format_constitution.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
root="$PWD"
|
||||
|
||||
folder_pdf="pdf_constitution"
|
||||
folder_pdf_tmp="pdf_constitution_tmp"
|
||||
|
||||
function build_pdf() {
|
||||
# used to match **
|
||||
shopt -s globstar
|
||||
|
||||
# wipe and reset past runs
|
||||
rm -rf "$folder_pdf"
|
||||
mkdir "$folder_pdf"
|
||||
|
||||
mkdir "$folder_pdf_tmp"
|
||||
cd "$folder_pdf_tmp"
|
||||
# 3 times so the table of contens can work
|
||||
pdflatex -file-line-error -interaction=nonstopmode -synctex=1 -output-format=pdf ../Resources/Documents/Constitution.tex || true
|
||||
pdflatex -file-line-error -interaction=nonstopmode -synctex=1 -output-format=pdf ../Resources/Documents/Constitution.tex || true
|
||||
pdflatex -file-line-error -interaction=nonstopmode -synctex=1 -output-format=pdf ../Resources/Documents/Constitution.tex || true
|
||||
cd ../
|
||||
cp "$folder_pdf_tmp"/*.pdf "$folder_pdf"
|
||||
rm -rf "$folder_pdf_tmp"
|
||||
|
||||
shopt -u globstar
|
||||
cd $root
|
||||
|
||||
# wait for background tasks to complete
|
||||
wait $(jobs -p)
|
||||
}
|
||||
|
||||
build_pdf
|
Loading…
Add table
Add a link
Reference in a new issue