Class: Vagrant::Command::Package
- Defined in:
- lib/vagrant/command/package.rb
Instance Method Summary collapse
Methods inherited from Base
Methods included from Util::SafePuts
Constructor Details
This class inherits a constructor from Vagrant::Command::Base
Instance Method Details
#execute ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/vagrant/command/package.rb', line 6 def execute = {} opts = OptionParser.new do |opts| opts. = "Usage: vagrant package [vm-name] [--base name] [--output name.box]" opts.separator " [--include one,two,three] [--vagrantfile file]" opts.separator "" opts.on("--base NAME", "Name of a VM in virtualbox to package as a base box") do |b| [:base] = b end opts.on("--output NAME", "Name of the file to output") do |o| [:output] = o end opts.on("--include x,y,z", Array, "Additional files to package with the box.") do |i| [:include] = i end opts.on("--vagrantfile file", "Vagrantfile to package with the box.") do |v| [:vagrantfile] = v end end # Parse the options argv = (opts) return if !argv @logger.debug("package options: #{.inspect}") if [:base] package_base() else package_target(argv[0], ) end # Success, exit status 0 0 end |