Created
November 10, 2011 14:15
-
-
Save Marchino/1354942 to your computer and use it in GitHub Desktop.
watch directory
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
Marcos-MacBook-Pro:~ marcocrepaldi$ ps aux | |
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND | |
marcocrepaldi 25226 0.0 2.7 2557336 114636 s004 S+ 3:11PM 0:14.09 ruby path/to/rake watcher:start |
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
require 'guard' | |
namespace :watcher do | |
desc "starts watching catalogues directory" | |
task :start => :environment do | |
listener = Guard::Listener.select_and_init('/Users/marcocrepaldi/catalogues') | |
listener.on_change do |files| | |
puts files | |
end | |
listener.start | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment