Skip to content

Instantly share code, notes, and snippets.

@code-later
Created August 23, 2011 19:49
Show Gist options
  • Save code-later/1166298 to your computer and use it in GitHub Desktop.
Save code-later/1166298 to your computer and use it in GitHub Desktop.
watch with fsevent
#! /usr/bin/env ruby
require 'rubygems'
require 'rb-fsevent'
command = ARGV[0]
fsevent = FSEvent.new
fsevent.watch Dir.pwd do |directories|
system command
end
fsevent.run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment