Sha256: 7374603f612abfb463204067f0a99306d2f87a79d7eb967c046b0e29dcd7af15

Contents?: true

Size: 826 Bytes

Versions: 15

Compression:

Stored size: 826 Bytes

Contents

#!/usr/bin/env ruby

require 'rubygems'

path = File.dirname(__FILE__)
if File.exists?("#{path}/../.gitignore")
  %w(aws-cfn-decompiler aws-cfn-compiler cloudformation-ruby-dsl).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 |path|
    exts.each { |ext|
      exe = File.join(path, "#{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

15 entries across 15 versions & 1 rubygems

Version Path
aws-cfn-compiler-0.8.9 bin/cfn-compiler
aws-cfn-compiler-0.8.8 bin/cfn-compiler
aws-cfn-compiler-0.8.7 bin/cfn-compiler
aws-cfn-compiler-0.8.6 bin/cfn-compiler
aws-cfn-compiler-0.8.5 bin/cfn-compiler
aws-cfn-compiler-0.8.4 bin/cfn-compiler
aws-cfn-compiler-0.8.3 bin/cfn-compiler
aws-cfn-compiler-0.8.2 bin/cfn-compiler
aws-cfn-compiler-0.8.1 bin/cfn-compiler
aws-cfn-compiler-0.8.0 bin/cfn-compiler
aws-cfn-compiler-0.7.0 bin/cfn-compiler
aws-cfn-compiler-0.6.0 bin/cfn-compiler
aws-cfn-compiler-0.5.2 bin/cfn-compiler
aws-cfn-compiler-0.5.1 bin/cfn-compiler
aws-cfn-compiler-0.5.0 bin/cfn-compiler