Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- indexer_in = ENV['PATH'].gsub(';', ':').split(':').detect {|p| f = File.join(p, 'indexer') ; File.exist?(f) || File.exist?(f + '.exe')}
- if indexer_in
- # we know it's in the path, so run - or use indexer_in to address the path directly.
- `indexer`[/^Sphinx (\d\.\d\.\d)/, 1]
- else
- puts 'not found'
- end
Add Comment
Please, Sign In to add comment