Sha256: fbc8d6b60acdf1a91db1d4e45a865a5f82c9b8a010e2d249b9b1c5a7003b3312

Contents?: true

Size: 795 Bytes

Versions: 3

Compression:

Stored size: 795 Bytes

Contents

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

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

OptionParser.new do |opt|
  config = Bcupgrade::ConfigFile.new

  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, config)
  rescue StandardError => e
    puts "Error: #{e}.\nSee #{opt}"
    exit
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bcupgrade-0.9.4 exe/bcupgrade
bcupgrade-0.9.3 exe/bcupgrade
bcupgrade-0.9.2 exe/bcupgrade