Skip to content

Instantly share code, notes, and snippets.

@posva
Created August 22, 2014 14:50
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 posva/a97dbca32d112d604503 to your computer and use it in GitHub Desktop.
Save posva/a97dbca32d112d604503 to your computer and use it in GitHub Desktop.
Watch for files changes
#! /bin/sh
WHEN=$(stat -c "%Y" report.tex)
while true; do
NOW=$(stat -c "%Y" report.tex)
if [ "$NOW" -gt "$WHEN" ]; then
make
fi
WHEN="$NOW"
sleep 1
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment