Sha256: b3b3d26ad129296efd07d8bd94c0bbdcad59dd9c3989b7a31d80af637829f879

Contents?: true

Size: 865 Bytes

Versions: 1

Compression:

Stored size: 865 Bytes

Contents

#!/usr/bin/env ruby

require 'rubygems'

path = File.dirname(__FILE__)
if File.exists?("#{path}/../.gitignore")
  %w(aws-cfn-decompiler aws-cfn-compiler aws-cfn-dsl cloudformation-ruby-dsl dldinternet-mixlib-logging).each do |mod|
    add_path = File.expand_path(File.join(path, "../../#{mod}", "lib"))
    $:.unshift(add_path)
  end
else
  # Borrowing from "whiches" gem ...
  cmd  = File.basename(__FILE__, '.rb')
  exes = []
  exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
  ENV['PATH'].split(File::PATH_SEPARATOR).each do |pth|
    exts.each { |ext|
      exe = File.join(pth, "#{cmd}#{ext}")
      exes << exe if File.executable? exe
    }
  end
  if exes.size > 0
    path = File.dirname(exes[0])
  end

end
add_path = File.expand_path(File.join(path, "..", "lib"))
$:.unshift(add_path)

require 'aws/cfn/compiler'
Aws::Cfn::Compiler::Main.new.run

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aws-cfn-compiler-0.8.10 bin/cfn-compiler