Sha256: ce33de3ae756bb7d7c796953689d8e8c495bb1f61df40cb4e668e2309e5c3bdd

Contents?: true

Size: 660 Bytes

Versions: 5

Compression:

Stored size: 660 Bytes

Contents

#!/usr/bin/env ruby

$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'twhere'
require 'optparse'

options = {}
OptionParser.new do |opts|
  opts.banner = 'usage: twhere.rb [options]'

  opts.on('-c', '--config FILE', 'specify config file') do |c|
    options[:config_file] = c
  end

  opts.on_tail('-h', '--help', 'show this message') do
    puts opts
    exit
  end

  opts.on_tail('--version', 'show version') do
    version = YAML::load(File.open(File.join(File.dirname(__FILE__), '..', 'VERSION.yml')))
    puts "#{version[:major]}.#{version[:minor]}.#{version[:patch]}"
    exit
  end
end.parse!

Twhere.new(options[:config_file]).run

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sarnesjo-twhere-0.0.0 bin/twhere
sarnesjo-twhere-0.0.1 bin/twhere
sarnesjo-twhere-0.0.3 bin/twhere
sarnesjo-twhere-0.0.4 bin/twhere
sarnesjo-twhere-0.0.5 bin/twhere