PageRenderTime 44ms CodeModel.GetById 41ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 0ms

/tools/Rake/ilmerge.rb

http://github.com/agross/netopenspace
Ruby | 17 lines | 14 code | 3 blank | 0 comment | 0 complexity | 9bf91bff9102dc613093ed6e3cf99f6b MD5 | raw file
 1class ILMerge
 2	def self.merge(attributes)
 3		tool = attributes.fetch(:tool)
 4		assemblies = attributes.fetch(:assemblies)
 5		params = attributes.fetch(:params)
 6		
 7		attributes = params.collect { |key, value|
 8			"/#{key}#{":#{value}" unless value.kind_of? TrueClass or value.kind_of? FalseClass}" if value
 9		}.reject { |value| 
10			value.nil?
11		}
12
13		mkdir_p params[:out].dirname
14		
15		sh tool, *(attributes + assemblies)
16	end
17end