Advertisement
Guest User

Untitled

a guest
Feb 25th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. TEX='report.tex'
  4. DEP=$(find . -name '*.tex' -not -name $TEX)
  5. PDF=${TEX%.tex}.pdf
  6.  
  7. compile() {
  8. pdflatex $TEX < /dev/null
  9. }
  10.  
  11. [ -e $PDF ] || compile
  12. mupdf $PDF &
  13.  
  14. while inotifywait -qr -o /dev/null -e modify $TEX $DEP; do
  15. compile
  16. [ -e $PDF ] && killall -HUP mupdf
  17. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement