#!/usr/bin/env ruby # -*- encoding: utf-8 -*- def shut_down puts "\nShutting down gracefully..." sleep 1 end Signal.trap("INT") { shut_down exit } $stdout.sync = true $stderr.sync = true $LOAD_PATH.unshift File.join(File.dirname(__FILE__), %w[.. lib]) require "wombat/cli" begin Wombat::Runner.new(Wombat::Options.parse(ARGV)).start rescue => ex $stderr.puts ">>> #{ex.message}" exit(($? && $?.exitstatus) || 99) end