Created
August 19, 2012 17:06
-
-
Save moredip/3396305 to your computer and use it in GitHub Desktop.
A very hacky build script using Guard
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
require 'fileutils' | |
def run_guard | |
Signal.trap("HUP") { exit } | |
require 'guard' | |
Guard.setup | |
Guard::Dsl.evaluate_guardfile(:guardfile => 'Guardfile') | |
Guard.start | |
end | |
guard_pid = fork { run_guard } | |
sleep 2 | |
Dir['source/**/*'].each{ |f| FileUtils.touch(f) } | |
sleep 2 | |
Process.kill "HUP", guard_pid | |
Process.wait( guard_pid ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment