Adding general overhauls, autobuild script and structuring
This commit is contained in:
22
build.sh
Executable file
22
build.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Setup tmp folder
|
||||
mkdir tmp
|
||||
|
||||
# Compile files & card items (incl. any args)
|
||||
cp template/cards.tex tmp/cards.tex
|
||||
go run main.go "$@" >> tmp/cards.tex
|
||||
echo "\end{document}" >> tmp/cards.tex
|
||||
|
||||
# Compile!
|
||||
pdflatex tmp/cards.tex
|
||||
|
||||
mv cards.pdf latest.pdf
|
||||
|
||||
if [ "$1" == "-snap" ]; then
|
||||
cp tmp/cards.tex "snapshot/$(date +"%Y%m%d-%Hh%M").tex"
|
||||
fi
|
||||
|
||||
rm cards.aux cards.log
|
||||
rm tmp/*
|
||||
rmdir tmp
|
||||
Reference in New Issue
Block a user