Created
October 5, 2014 09:49
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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