Sha256: 7226d8527809e63fd1eae14b364c6847a0d72076753204e10539086d913aca15

Contents?: true

Size: 816 Bytes

Versions: 1

Compression:

Stored size: 816 Bytes

Contents

module Wrapp
  class CLI
    include Mixlib::CLI

    banner "Usage: #{File.basename($0)} [options] APP_PATH"

    option :filesystem,
      long: '--filesystem FILESYSTEM',
      short: '-f FILESYSTEM',
      description: 'Causes a filesystem of the specified type to be written to the image.'
    option :volume_name,
      long: '--volume-name NAME',
      short: '-n NAME',
      description: 'Volume name of the newly created filesystem.'

    class << self
      def run
        new.run(ARGV)
      end
    end

    def run(argv)
      app_path = parse_options(argv).first
      if app_path
        wrapp(app_path, config)
      else
        warn 'ERROR: App path is missing!'
        puts opt_parser
        exit 2 
      end
    end

    def wrapp(*opts)
      DMGBuilder.new(*opts).create
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wrapp-1.0.0 lib/wrapp/cli.rb