Sha256: 3039af48d09c92c5fa3c9cae0c3f01d39480d6596935b74dc568e1c9f2ca763b
Contents?: true
Size: 732 Bytes
Versions: 1
Compression:
Stored size: 732 Bytes
Contents
#!/usr/bin/env ruby require "bundler/setup" require "vcloud/converter" require "optparse" ARGV << '-h' if ARGV.empty? options = {} OptionParser.new do |opts| opts.banner = "Usage: ./bin/convert -t vcloud-net_launcher -p path/to/file.yaml" opts.on('-t', '--type TYPE', 'Type of YAML file for conversion.') { |v| options[:type] = v } opts.on('-p', '--path PATH', 'Path to YAML file for conversion.') { |v| options[:path] = v } opts.on_tail("-h", "--help", "Show this help message.") do puts opts exit end end.parse! if File.exists?(File.expand_path(options[:path])) Vcloud::Converter.convert(options[:type], options[:path]) else puts "The file you specified - #{options[:path]} - doesn't exist." exit end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vcloud-converter-0.1.0 | bin/convert |