#!/usr/bin/env ruby $:.unshift(File.dirname(__FILE__) + '/../lib') require 'rubygems' require 'oct' require 'optparse' require 'term/ansicolor' available_actions = Oct::AVAILABLE_ACTIONS banner = < e puts "oct #{e}" puts "oct --help for more information" exit 1 end end if STDOUT.isatty Term::ANSIColor::coloring = options[:coloring] if options[:coloring] && Oct::WINDOWS begin require 'Win32/Console/ANSI' rescue LoadError Term::ANSIColor::coloring = false STDERR.puts 'WARNING: You must "gem install win32console" (1.2.0 or higher) to get color output on MRI/Windows' end end else Term::ANSIColor::coloring = false end app = Oct::App.new(FileUtils.pwd, options) app.run