#!/usr/bin/env ruby $: << File.join(File.dirname(__FILE__),'..','lib') require 'deploy' def usage(errormessage = "") puts errormessage puts "usage: " puts " vmdeploy [executable]" puts "" puts " archive : the archive to deploy" puts " executable: the executable to execute after deployment - default : 'vmsim'" puts "" exit 1 end archive = ARGV[0] executable = ARGV[1] || 'vmsim' usage unless archive usage("archive #{archive} does not exist") unless File.exists?(archive) Deploy::Deployer.new(executable).deploy ARGV[0]