wkhere / forever.py

kqueue-based file monitor for OSX/BSD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

!! ---- important ---- !!
This is obsolete, please use shell-based http://github.com/herenowcoder/forever instead.
!! ------------------- !!


Kqueue-based monitor for Mac OS X & BSD to trigger commands on source
file change.


Examples of usage for rubymotion projects:
                        ./forever rake spec
   bit crazy usage:     ./forever rake spec device
   (installs on the device the app which runs only the specs!)
   uber usage:          ./forever 'rake spec && rake device'


Current behavior is that it ignores newly created files -> requires
restart.  It also seems to remember another file change while command
is running and then triggers another run - quite good!

This impl is excellent to do in python as kqueue api comes with the vanilla
mac python - no gems, eggs etc.


Installing:

% curl https://raw.github.com/herenowcoder/forever/master/forever.py -o forever
% chmod a+x forever

Just put it in your project dir or wherever on the PATH if you prefer.


License:

This code is released under the BSD 2-Clause License.

About

kqueue-based file monitor for OSX/BSD

License:BSD 2-Clause "Simplified" License


Languages

Language:Python 100.0%