Sha256: ea1abc458ab157f26d695776b6aa7b4e743df0877ce4cac6faffe4ae7e7999f9

Contents?: true

Size: 735 Bytes

Versions: 2

Compression:

Stored size: 735 Bytes

Contents

#!/usr/bin/env ruby

require 'pathname'

# Not using optparse or trollop because they raise on unknown args, and 
# we want to pass all unknown args to elasticsearch.
args = ARGV.join(" ")

config_directory_arg = /-c\s+(\S+)\s?/

if dir = args.slice!(config_directory_arg)

  conf = config_directory_arg.match(dir){ |m| Pathname.new(m[1]) }

  raise "Must provide the configuration directory." unless conf.directory?

  ENV['ES_JAVA_OPTS'] = "-Des.path.conf=#{conf.to_s}"

  if es_include = conf.children(false).detect { |p| p.to_s == "elasticsearch.in.sh" }
    ENV['ES_INCLUDE'] = (conf + es_include).to_s
  end
end

exec (Pathname.new(File.dirname(__FILE__)) + "../vendor/elasticsearch/bin/elasticsearch").realpath.to_s, args.strip

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
springboard-0.19.0 bin/springboard
springboard-0.18.7.1 bin/springboard