build is clean and nice

This commit is contained in:
Bel LaPointe
2022-10-18 14:48:13 -06:00
parent aa7795215e
commit 38470725a6
2 changed files with 9 additions and 7 deletions

View File

@@ -64,6 +64,10 @@ build() {
fi
cat ./resume.yaml | gojq --yaml-input > resume.json
cleanup() {
rm ./resume.json
}
trap cleanup EXIT
for theme in ${THEMES//,/ }; do
THEME=$theme build_theme
@@ -75,10 +79,10 @@ build_theme() {
(
resume validate
resume export resume.$THEME.html --theme $THEME || true
if [ -f resume.$THEME.html ]; then
wkhtmltopdf --page-size $PAGE_SIZE ./resume.$THEME.html ./resume.$THEME.pdf
mkdir -p ./out
resume export ./out/resume.$THEME.html --theme $THEME || true
if [ -f ./out/resume.$THEME.html ]; then
wkhtmltopdf --page-size $PAGE_SIZE ./out/resume.$THEME.html ./out/resume.$THEME.pdf
fi
) || true
}