Class/Module Index [+]

Quicksearch

Pkg::Util::Tool

Utility methods for handling system binaries

Constants

GIT

Set up paths to system tools we use in the packaging repo no matter what distribution we’re packaging for.

Public Class Methods

check_tool(tool) click to toggle source
# File ext/packaging/lib/packaging/util/tool.rb, line 8
def check_tool(tool)
  find_tool(tool, :required => true)
end
find_tool(tool, args={:required => false}) click to toggle source
# 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
Also aliased as: has_tool
has_tool(tool, args={:required => false}) click to toggle source
Alias for: find_tool

[Validate]

Generated with the Darkfish Rdoc Generator 2.