Created
February 18, 2010 15:54
-
-
Save kazjote/307756 to your computer and use it in GitHub Desktop.
This file contains 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 | |
# Simple script which can be used with couchapp to automatically | |
# push applications to couchdb on files update on systems supporting inotify. | |
# | |
# First install rubygems in your system, then: | |
# | |
# $ sudo gem install rb-inotify | |
# $ cd couchapp_project | |
# $ ./couchapp_updater | |
# | |
require 'rubygems' | |
require 'rb-inotify' | |
notifier = INotify::Notifier.new | |
notifier.watch(".", :close_write, :recursive) do |event| | |
`couchapp push` | |
end | |
notifier.run |
This file contains 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment