Skip to content

Instantly share code, notes, and snippets.

@ezmiller
Created October 5, 2014 09:49
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 ezmiller/acb0d91c8b48984e385a to your computer and use it in GitHub Desktop.
Save ezmiller/acb0d91c8b48984e385a to your computer and use it in GitHub Desktop.
bash script command line code to watch a stylus file for change and then compile on change
while true; do
change=$(inotifywait -e close_write,moved_to,create .);
change=${change#./ * };
if [ "$change" = "style.styl" ]; then
echo $(date); stylus style.styl -o ../..;
fi;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment