Sha256: c74ddcc8a362f009008a3704c65ea9ba5c3aa7bac53de59dbf97b75c1a71db13

Contents?: true

Size: 882 Bytes

Versions: 6

Compression:

Stored size: 882 Bytes

Contents

#!/usr/bin/ruby
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require "poolparty"
require "poolpartycl"

# Get the git-style program action
# o = PoolParty::Optioner.new(ARGV) do |opts, optioner|
#   opts.on('-n [name]','--name [name]', 'Binary to run')    { |o| optioner.name o }
# end

name = ARGV.shift

# If there was no program action given
if !name || name == "-h" || name == "--help"
  puts "Usage: cloud <specfile> <action> <options>"
  puts "Cloud actions:"
  puts Binary.list_binaries_for("cloud")
  exit
end

program_name = "#{File.basename($0)}-#{name}"
program_location = File.join(Binary.binary_directory, program_name)

command_line = "#{program_location} #{ARGV.join(" ")}"

# Run it from the command-line first
if Binary.available_binaries_for("cloud").include?(name)
  exec "#{command_line}"
else
  puts "Unknown poolparty binary: #{program_name}"
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
auser-poolparty-0.2.2 bin/cloud
auser-poolparty-0.2.3 bin/cloud
auser-poolparty-0.2.4 bin/cloud
auser-poolparty-0.2.5 bin/cloud
auser-poolparty-0.2.6 bin/cloud
poolparty-0.2.6 bin/cloud