Runs a user defined "watchfile.sh" when files change, based on entr.
I made this to automate the compiling and reloading the browser each time I make a change to an .yaml of .jade file, for my yaml-resume->html project here.
$ watch [file ...]
Watch stays open and if any of the provided files changes, it automatically calls the "watchfile.sh" script.
To stop watch, a nice ^C will do.
If no file is provided, by default it will look for all the files
that are directly inside a folder named "src" in the current directory,
not counting directories nor following them i.e. find ./src -depth 1 -type f
You can use the easy install script:
$ sh <(curl http://bit.ly/1hBp3Uy -L)
Or to install manually, please copy the watch script to somewhere in your path variable. I recommend something like this:
$ cp watch /usr/local/bin
$ chmod +x /usr/local/bin/watch
And to uninstall simply remove it, like this:
$ rm /usr/local/bin/watch
-
entr, please install this manually.
On Mac OS X:
brew install entrOn other platforms you may want to use the official instructions provided here, or check if there is a package for your favorite package manager.
- Edward Alvarado, for being my first beta tester.
- Eric Radman, for making entr and kindly submitting a patch.
- Mitch Tishmack,
for making
entreasy to install on Mac OS X.