Created
June 1, 2009 14:16
-
-
Save fixlr/121437 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 | |
# | |
# This stupid Braid game completely locks up OSX when the | |
# campaign file gets corrupted. Rather than restarting over | |
# and over again while I try to restore from a previous save | |
# point, I decided to whip up this kill script. | |
while true do | |
braid_id = %x[ps auxx | grep "Braid.app" | grep -v auxx | grep -v grep | awk '{print $2}'] | |
if braid_id.empty? | |
puts "Braid is not running." | |
else | |
system("kill -9 #{braid_id}") | |
puts "Killed!" | |
end | |
sleep 20 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment