27 lines
572 B
Ruby
Executable file
27 lines
572 B
Ruby
Executable file
#!/usr/bin/env ruby
|
|
# vim: set syntax=ruby:
|
|
|
|
require 'yaml'
|
|
require 'singleton'
|
|
require 'pathname'
|
|
|
|
require 'colorize'
|
|
require 'pp'
|
|
|
|
DATA_DIR = (Pathname.new(__FILE__).dirname + '..').realpath.to_s
|
|
|
|
# FIXME: should not require including the 'lib' dir.
|
|
#$:.insert 0, File.join(DATA_DIR, 'lib')
|
|
|
|
require 'thor'
|
|
require 'kook'
|
|
|
|
begin
|
|
Kook::CLI::Main.start(ARGV)
|
|
rescue Exception => exception
|
|
# In case of unhandled exception.
|
|
# FIXME: Manage display & create log file
|
|
STDERR.puts "ERROR(#{exception.class}) : #{exception}"
|
|
STDERR.puts exception.backtrace
|
|
exit 1
|
|
end
|