Skip to content

Instantly share code, notes, and snippets.

@kana
Created May 3, 2011 23:16
Show Gist options
  • Save kana/954449 to your computer and use it in GitHub Desktop.
Save kana/954449 to your computer and use it in GitHub Desktop.
require 'rake'
require 'watchr'
file 'foo' => ['bar', 'baz'] do
sh 'cat bar baz >foo'
end
if self.instance_of? Watchr::Script::EvalContext then
watch /^(bar|baz)$/ do
sh 'rake -f rake_and_watchr.rb foo'
end
end
__END__
vim: filetype=ruby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment