Sha256: bf38e210d22838333dea840f5e20a504c4bb918641475cf553fdc76b495f4a5a

Contents?: true

Size: 818 Bytes

Versions: 3

Compression:

Stored size: 818 Bytes

Contents

#!/usr/bin/env ruby

require 'bcupgrade'
require 'optparse'
require 'readline'

OptionParser.new do |opt|
  begin
    opt.program_name = File.basename($PROGRAM_NAME)
    opt.banner = "Usage: #{opt.program_name} [options] [cask1 cask2 ...]"

    options = {}
    opt.on('-d', '--dry-run', 'Check version without installing') do |v|
      options[:dry_run] = v
    end
    opt.on('-r', '--remove', 'Remove previous version with installing') do |v|
      options[:remove] = v
    end
    opt.on('-y', '--yes', 'Install cask without prompt') do |v|
      options[:install] = v
    end
    opt.on('-v', '--version', 'Show version number') do
      puts Bcupgrade::VERSION
      exit
    end

    args = opt.parse!(ARGV)

    Bcupgrade.run(options, args)
  rescue => e
    puts "Error: #{e}.\nSee #{opt}"
    exit
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bcupgrade-0.3.3 exe/bcupgrade
bcupgrade-0.3.2 exe/bcupgrade
bcupgrade-0.3.1 exe/bcupgrade