Skip to content

Instantly share code, notes, and snippets.

@larrytheliquid
Created April 27, 2011 03:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larrytheliquid/943644 to your computer and use it in GitHub Desktop.
Save larrytheliquid/943644 to your computer and use it in GitHub Desktop.
tex = ARGV[0]
modified_at = File.mtime tex
puts "Starting from: #{modified_at}"
loop do
if modified_at != (mtime = File.mtime tex)
modified_at = mtime
`pdflatex #{tex}`
puts "Recompiled for: #{modified_at}"
end
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment