Skip to content

Instantly share code, notes, and snippets.

@snim2
Created December 8, 2015 23:20
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snim2/5cccacc893ff9cb0a4bb to your computer and use it in GitHub Desktop.
Save snim2/5cccacc893ff9cb0a4bb to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# This script automatically runs 'make' whenever any of the LaTeX files in
# this directory are saved. Open the PDF file you want to view in the
# background, and run this script in the shell. Every time you save a
# LaTeX file, the LaTeX will be recompiled and an updated version of the PDF
# will be displayed in your PDF viewer.
#
#
# This script requires inotify-tools to be installed. e.g. on Ubuntu:
#
# sudo apt-get install inotify-tools
#
cd `pwd`
while true
do
inotifywait -e close_write *.tex ; make clean && make
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment