Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- TEX='report.tex'
- DEP=$(find . -name '*.tex' -not -name $TEX)
- PDF=${TEX%.tex}.pdf
- compile() {
- pdflatex $TEX < /dev/null
- }
- [ -e $PDF ] || compile
- mupdf $PDF &
- while inotifywait -qr -o /dev/null -e modify $TEX $DEP; do
- compile
- [ -e $PDF ] && killall -HUP mupdf
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement