Utility methods for handling system binaries
Set up paths to system tools we use in the packaging repo no matter what distribution we’re packaging for.
# File ext/packaging/lib/packaging/util/tool.rb, line 8 def check_tool(tool) find_tool(tool, :required => true) end
# File ext/packaging/lib/packaging/util/tool.rb, line 12 def find_tool(tool, args={:required => false}) ENV['PATH'].split(File::PATH_SEPARATOR).each do |root| location = File.join(root, tool) return location if FileTest.executable? location end fail "#{tool} tool not found...exiting" if args[:required] return nil end
Generated with the Darkfish Rdoc Generator 2.