#!/usr/bin/env ruby $:.unshift File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib])) require 'thor' require 's3download' def help S3download::Cli.start(%w{help fetch}) end begin ENV["THOR_DEBUG"] = "1" S3download::Cli.start rescue Thor::RequiredArgumentMissingError => e puts "\e[31mMissing Arguments: #{e}\e[0m\n\n" help rescue Thor::InvocationError => e puts "\e[31m#{e.to_s.gsub(/Usage:.+"/, '').chomp} but there's no such option\e[0m\n\n" help end