Sha256: d3cba1184bbf78c8bbd1e02004d863ba8a3f2346f4bd38320f0d9d1106ea9b68

Contents?: true

Size: 611 Bytes

Versions: 1

Compression:

Stored size: 611 Bytes

Contents

#!/usr/bin/env ruby
require 'dmtool'

trap 'SIGINT' do
  exit
end

def parse_opts!
  options = {}
  opt_parser = OptionParser.new do |opts|
    opts.program_name = "dmtool"
    opts.banner = "#{opts.program_name} [options]"
    opts.on('-v', '--version', 'Print version information') do
      puts "#{opts.program_name} #{DMTool::VERSION}"
      exit true
    end
    opts.on('-h', '--help', 'Display this screen') do
      puts opts
      exit true
    end
  end
  begin
    opt_parser.parse!
  rescue OptionParser::InvalidOption => e
    puts e.message
    exit false
  end
end

parse_opts!
DMTool::CLI.start

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dmtool-0.0.1 bin/dmtool