Fix execution when /home/jls/projects/logstash is not the root of the git repo.

This commit is contained in:
Jordan Sissel 2013-01-14 22:37:02 +00:00
parent a2a7c5f2a8
commit eb79f504fb

View file

@ -1,9 +1,10 @@
#!/bin/sh
if [ -d .git ] ; then
export GEM_HOME=./vendor/bundle/jruby/1.9
basedir=$(cd `dirname $0`/..; pwd)
if [ -d "$basedir/.git" ] ; then
export GEM_HOME="$basedir/vendor/bundle/jruby/1.9"
export GEM_PATH=
fi
export RUBYLIB=./lib
ruby lib/logstash/runner.rb "$@"
export RUBYLIB="$basedir/lib"
ruby "$basedir/lib/logstash/runner.rb" "$@"