vaguerent/lib/vagrant/command/box_repackage.rb
Mitchell Hashimoto e29c5436e1 Box commands
2011-12-17 19:52:48 -08:00

24 lines
470 B
Ruby

require 'optparse'
module Vagrant
module Command
class BoxRepackage < Base
def execute
options = {}
opts = OptionParser.new do |opts|
opts.banner = "Usage: vagrant box repackage <name>"
end
# Parse the options
argv = parse_options(opts)
return if !argv
b = @env.boxes.find(argv[0])
raise Errors::BoxNotFound, :name => argv[0] if !b
b.repackage
end
end
end
end