Created
October 14, 2009 22:08
-
-
Save toreriklinnerud/210448 to your computer and use it in GitHub Desktop.
Start spork before autospec if not already running
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 | |
`ps | grep /spork$ | grep -v grep` | |
if $?.success? | |
exec('autospec') | |
else | |
IO.popen('(spork&) 2>&1') do |messages| | |
puts(message = messages.gets) until message =~ /ready/ | |
exec('autospec') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment