Skip to content

NinoScript/watch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

watch

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.

Usage

$ 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

Install / Uninstall

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

Dependencies

  • entr, please install this manually.

    On Mac OS X:

      brew install entr
    

    On other platforms you may want to use the official instructions provided here, or check if there is a package for your favorite package manager.

Special Thanks to

About

Run arbitrary scripts files when files change

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages