Sha256: 02a606f689907462390117bda429832002308efe92e4d5ef8f99a3097e3291ee

Contents?: true

Size: 749 Bytes

Versions: 2

Compression:

Stored size: 749 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

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 outdated cask without upgrading') do |v|
      options[:dry_run] = v
    end
    opt.on('-y', '--yes', 'Automatic yes to prompts') 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 StandardError => e
    puts "Error: #{e}.\nSee #{opt}"
    exit
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bcupgrade-0.9.1 exe/bcupgrade
bcupgrade-0.9.0 exe/bcupgrade