Command-line tools and scripts that use OS X's FSEvents API. Mostly useful for watching a directory and reacting to changes in it.
This post explains why I made this and includes more usage examples.
Alert if any files in a directory are changed.
notifywait /path/; echo "\007"
Rebuild LESS when anything in
styles changes. Assuming you have a script similar to this
#!/bin/bash for less_file in styles/*.less do css_file=`echo $less_file | sed -E "s/.less//"` lessc $less_file $css_file.css done
notifyloop styles ./rebuild_less.sh
Automatically rsync files to a remote server if any of them are changed.
autorsync . 192.168.1.127:/var/www
Same as above, but don't copy .pyc files.
notifyloop ~/code/directory rsync -avz --exclude="*.pyc" ~/code/directory/ server.example.com:/stuff/
Building from source
In addition to the standard automake/autoconf/make, you'll need pkg-config.
brew install pkg-config should do the trick.
Once you have all the dependencies, run
Building a release tarball
GPG-signed releases are available here.
Building release tarballs requires the same dependencies, except for automake and pkg-config. Once you've installed the dependencies, run:
./configure make make install
Depending on permissions,
make install may require