rossta/lionel_richie

View on GitHub
bin/lionel

Summary

Maintainability
Test Coverage
#! /usr/bin/env ruby

# Trap interrupts to quit cleanly. See
# https://twitter.com/mitchellh/status/283014103189053442
Signal.trap("INT") { exit 1 }

begin
  require 'lionel_richie'
rescue LoadError
  $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
  require 'lionel_richie'
end

# Output message to $stderr, prefixed with the program name
def pute(*args)
  first = args.shift.dup
  first.insert(0, "#{$0}: ")
  args.unshift(first)
  $stderr.puts(*args)
end

Lionel::CLI.start(ARGV)