vu-beamer/compile.sh

32 lines
500 B
Bash
Raw Permalink Normal View History

2022-03-13 16:51:01 +01:00
#!/usr/bin/env bash
LOGO="images/logo"
FOOTER="images/footer"
DPI=600
clean() {
rm -rf *.aux *.nav *.toc *.log *.snm *.out *.vrb _minted*
}
convert_images() {
if [ ! -f "${LOGO}.png" ]; then
convert -density ${DPI} ${LOGO}.svg ${LOGO}.png
fi
if [ ! -f "${FOOTER}.png" ]; then
convert -density ${DPI} ${FOOTER}.svg ${FOOTER}.png
fi
}
main() {
clean
convert_images
xelatex --shell-escape "${1}"
xelatex --shell-escape "${1}"
clean
echo "Done, output is ${1%.*}.pdf"
}
main "${1}"