Sha256: 47e22c8bac2925d95d896c0c7ac05f576d0a0757cedd40745a224072eb04fada
Contents?: true
Size: 893 Bytes
Versions: 5
Compression:
Stored size: 893 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 dldinternet-mixlib-cli).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
5 entries across 5 versions & 1 rubygems