Top Level Namespace
Defined Under Namespace
Modules: Soltius
Instance Method Summary collapse
Instance Method Details
#check_for(what) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'ext/extconf.rb', line 9 def check_for(what) $stdout.print("checking for #{what}... ") $stdout.flush result = which(what) $stdout.puts(result.nil? ? 'no' : 'yes') $stdout.flush result end |
#which(cmd) ⇒ Object
1 2 3 4 5 6 7 |
# File 'ext/extconf.rb', line 1 def which(cmd) ENV['PATH'].split(File::PATH_SEPARATOR).each do |path| exe = File.join(path, cmd) return exe if File.executable?(exe) && !File.directory?(exe) end return nil end |