builder/extra/tools/ruby-tpm/configurator.rb
def which(cmd)
  if ! cmd
    nil
  else 
    path = cmd_result("which #{cmd}")
    path.chomp!
    if File.executable?(path)
      path
    else
      nil
    end
  end
end
# Find out the full executable path or return nil
# if this is not executable. 
Find out the full executable path or return nil
if this is not executable.
Find out the full executable path or return nil if this is not executable .
def which(cmd)
  if ! cmd
    nil
  else 
    path = cmd_result("which #{cmd}")
    path.chomp!
    if File.executable?(path)
      path
    else
      nil
    end
  end
end
def which ( cmd ) if ! cmd nil else path = cmd_result ( "which #{cmd}" ) path . chomp! if File . executable? ( path ) path else nil end end end
Find out the full executable path or return nil
if this is not executable.
Find out the full executable path or return nil if this is not executable .
cmd