portfolio/latex_watch.sh

22 lines
488 B
Bash
Raw Normal View History

2022-08-02 20:09:45 +00:00
#!/bin/sh
mkdir latex_build
[ -v $TARGET_LOCALE ] && TARGET_LOCALE=fr
SOURCE=latex_build/resume_$TARGET_LOCALE.tex
compile() {
curl http://localhost:8001/latex-resume --header "Accept-Language: $TARGET_LOCALE" > $SOURCE
pdflatex --output-directory=latex_build -halt-on-error -shell-escape $SOURCE
echo "Compilation attempt for locale $TARGET_LOCALE terminated"
}
compile
while :
do
inotifywait -e modify templates/cv.tex
echo "file has changed"
compile
done