Sha256: 7b4cd10caf076d061c012095e225511d906c85f8125e9b51f40f30863fe092fd

Contents?: true

Size: 809 Bytes

Versions: 4

Compression:

Stored size: 809 Bytes

Contents

require 'optparse'

module Veewee
  module Command
    class BaseboxBuild < Vagrant::Command::Base
      def execute
        options = {}

        opts = OptionParser.new do |opts|
          opts.banner = "Build the box <boxname>"
          opts.separator ""
          opts.separator "Usage: vagrant basebox build <boxname>"

          opts.on("-f", "--force", "overwrite the basebox") do |f|
            options['force'] = f
          end

          opts.on("-n", "--nogui", "no gui") do |n|
            options['nogui'] = n
          end
        end

        # Parse the options
        argv = parse_options(opts)
        return if !argv
        raise Vagrant::Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 1

        Veewee::Session.build(argv[0], options)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
HeSYINUvSBZfxqA-veewee-0.203.3 lib/veewee/command/basebox_build.rb
HeSYINUvSBZfxqA-veewee-0.203.2 lib/veewee/command/basebox_build.rb
HeSYINUvSBZfxqA-veewee-0.203.1 lib/veewee/command/basebox_build.rb
veewee-0.2.3 lib/veewee/command/basebox_build.rb