Sha256: e66b6e6e0202b1008b192f0c715d0c2e744c0d71c2361f09e93326327c4d0a2c
Contents?: true
Size: 812 Bytes
Versions: 2
Compression:
Stored size: 812 Bytes
Contents
require 'vagrant' require 'optparse' require 'pe_build/archive' module PEBuild class Command class Copy < Vagrant.plugin(2, :command) def execute options = {} parser = OptionParser.new do |o| o.banner = "Usage: vagrant pe-build copy path/to/installer.tar.gz" o.separator '' o.on('-v', '--version=val', String, "The version of PE to fetch") do |val| options[:version] = val end end argv = parse_options(parser) fpath = argv.last basename = File.basename(fpath) dirname = File.dirname(fpath) #unless options[:version] # raise Vagrant::Errors::CLIInvalidUsage, :help => parser.help.chomp #end archive = PEBuild::Archive.new(fpath, @env) archive.version = options[:version] archive.copy_from(dirname) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vagrant-pe_build-0.2.0 | lib/pe_build/command/copy.rb |
vagrant-pe_build-0.1.0 | lib/pe_build/command/copy.rb |