Skip to content

Instantly share code, notes, and snippets.

@moredip moredip/build.rb
Created Aug 19, 2012

Embed
What would you like to do?
A very hacky build script using Guard
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
You can’t perform that action at this time.