Created
September 3, 2012 20:49
-
-
Save peterhellberg/3613363 to your computer and use it in GitHub Desktop.
Tiny File System Event kicker
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'rb-fsevent' | |
cmd, *paths = ARGV | |
if cmd && paths.any? | |
system cmd | |
fsevent = FSEvent.new | |
fsevent.watch(paths) { system cmd } | |
fsevent.run | |
else | |
puts "How to run: kick 'cmd' path1 [path2]" | |
end |
Yes (I mainly use it to run my specs, and I want feedback as soon as possible)
How I use it for the old Rails project I’m working on right now: kick 'clear && rake' app lib spec
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it supposed to run before any event, on line 7?