Sha256: 7e62e92184bc9d4448964cb8905d28ef90fa324489278e3d0a2b5a872716ca9a

Contents?: true

Size: 601 Bytes

Versions: 1

Compression:

Stored size: 601 Bytes

Contents

#!/usr/bin/env ruby
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '../lib/'))

require 'upstart-exporter'
require 'optparse'

USAGE = "Usage: upstart-export -p PROCFILE -n APPNAME"
options = {}

OptionParser.new do |opts|

  opts.on("-p", "--procfile PROCFILE", "Procfile to export") do |p|
    options[:procfile] = p
  end

  opts.on("-n", "--appname NAME", "Application name") do |n|
    options[:app_name] = n
  end

end.parse!

abort(USAGE) unless options[:procfile] && options[:app_name]


begin
  Upstart::Exporter.new(options).export
rescue Upstart::ExportError => e
  abort(e.to_s)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
upstart-exporter-0.0.1 bin/upstart-export