Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 31 lines (20 sloc) 598 Bytes
#!/usr/bin/env ruby
require 'optparse'
$:.unshift File.dirname(__FILE__) + "/../lib"
if RUBY_VERSION.split('.')[1].to_i < 9
abort "ruby 1.9 is required to run koi"
end
require 'koi'
args = ARGV.dup
options = {:verbose => false, :silent => false}
OptionParser.new do |o|
o.banner = "usage: koi COMMAND [ARGS]"
o.separator ""
o.on_tail("-s", "--silent", "turn output off") do
options[:silent] = true
end
o.on_tail("-v", "--verbose", "enable verbose mode") do
options[:verbose] = true
end
end.parse!(args)
Koi::Command.new(args[0] || :status, args[1..-1], options).run