2010-02-12 05:48:48 +00:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
begin
|
|
|
|
require File.expand_path('../../.bundle/environment', __FILE__)
|
|
|
|
rescue LoadError
|
|
|
|
# Fallback on rubygems
|
|
|
|
require "rubygems"
|
|
|
|
end
|
|
|
|
|
|
|
|
require 'git-style-binary/command'
|
|
|
|
|
|
|
|
# Get library
|
|
|
|
libdir = File.join(File.dirname(__FILE__), '..', 'lib')
|
|
|
|
$:.unshift(libdir) unless $:.include?(libdir)
|
|
|
|
require 'vagrant'
|
|
|
|
|
|
|
|
GitStyleBinary.command do
|
|
|
|
short_desc "package the current vagrant environment"
|
|
|
|
banner <<-EOS
|
|
|
|
Usage: #{command.full_name} #{all_options_string}
|
|
|
|
|
2010-02-24 08:30:58 +00:00
|
|
|
Package the current vagrant environment into a box.
|
2010-02-12 05:48:48 +00:00
|
|
|
|
|
|
|
EOS
|
2010-02-28 06:49:43 +00:00
|
|
|
|
|
|
|
opt :include, "files to include in the package", :type => :strings
|
|
|
|
|
2010-02-12 05:48:48 +00:00
|
|
|
run do |command|
|
2010-02-28 06:49:43 +00:00
|
|
|
Vagrant::Commands.package(command.argv[0], command.opts[:include])
|
2010-02-12 05:48:48 +00:00
|
|
|
end
|
|
|
|
end
|