free_mutant/bin/mutant
Markus Schirp 745c82534b Trap INT in executable
Traping INT just after lauch, even before requireing library should
allow clean exits at all stages.

Closes #44
2013-06-21 23:55:13 +02:00

18 lines
336 B
Ruby
Executable file

#!/usr/bin/env ruby
trap('INT') do |status|
exit! 128+status
end
require 'mutant'
namespace =
if File.basename($0) == 'zombie'
$stderr.puts('Detected zombie environment...')
require File.expand_path('../../spec/support/zombie.rb', __FILE__)
Zombie.setup
else
Mutant
end
Kernel.exit(namespace::CLI.run(ARGV))