Sha256: 81322776b92e3c519397e253935cc0858d1682f9faff4c059df90db3e2a783d6

Contents?: true

Size: 822 Bytes

Versions: 7

Compression:

Stored size: 822 Bytes

Contents

#!/usr/bin/env ruby

require 'rubygems'

path = File.dirname(__FILE__)
if File.exists?("#{path}/../.gitignore")
  %w(aws-cfn-dsl 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/decompiler'
Aws::Cfn::DeCompiler::Main.new.run

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
aws-cfn-decompiler-0.8.2 bin/cfn-decompiler
aws-cfn-decompiler-0.8.1 bin/cfn-decompiler
aws-cfn-decompiler-0.8.0 bin/cfn-decompiler
aws-cfn-decompiler-0.7.0 bin/cfn-decompiler
aws-cfn-decompiler-0.6.0 bin/cfn-decompiler
aws-cfn-decompiler-0.5.2 bin/cfn-decompiler
aws-cfn-decompiler-0.5.0 bin/cfn-decompiler