Sha256: c27a56b13f52b5e7b5280bfa507e5f06c3dd2a0e3b0de2149106d8c01d239446

Contents?: true

Size: 602 Bytes

Versions: 1

Compression:

Stored size: 602 Bytes

Contents

#!/usr/bin/env ruby
require 'open3'

BIN_PATH = File.join(File.dirname(__FILE__), '..', 'ext', 'marisa-0.2.4', 'pkg', 'bin')

available_commands = %w(lookup reverse-lookup predictive-search benchmark build common-prefix-search dump)

if ARGV.size > 0 && available_commands.include?(ARGV.first.downcase)
  marisa_command = File.join(BIN_PATH, "marisa-#{ARGV[0]}")

  exec(marisa_command, *ARGV[1..-1])
else
  $stderr.puts "USAGE: melisa COMMAND [options]"
  $stderr.puts "Commands: #{available_commands}"
  $stderr.puts "See http://marisa-trie.googlecode.com/svn/trunk/docs/readme.en.html"
  exit -1
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
melisa-0.2.3 bin/melisa