2009-11-06 02:55:18 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
export LINK=$(which "$0")
|
|
|
|
export NAME=$(basename "$0")
|
|
|
|
while [ -L "$LINK" ]; do
|
|
|
|
LAST=$LINK
|
|
|
|
LINK="$(readlink "$LINK")"
|
|
|
|
if [ ! -L "$LINK" ]; then
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Chop it twice
|
|
|
|
BASE=$(dirname "$LAST")
|
|
|
|
BASE=$(dirname "$BASE")
|
|
|
|
export BASE
|
|
|
|
|
|
|
|
export PATH=${BASE}/app:$PATH
|
|
|
|
export LD_LIBRARY_PATH=${BASE}/lib:$LD_LIBRARY_PATH
|
2009-11-28 16:38:52 +00:00
|
|
|
unset GEM_PATH
|
2009-12-04 11:35:24 +00:00
|
|
|
unset GEM_HOME
|
2009-11-28 16:38:52 +00:00
|
|
|
unset MY_RUBY_HOME
|
|
|
|
unset RUBY_VERSION
|
|
|
|
unset RUBY_OPTS
|
2009-11-06 02:55:18 +00:00
|
|
|
|
|
|
|
if [ -f "${BASE}/msf3/${NAME}" ]; then
|
|
|
|
exec ${BASE}/msf3/${NAME} $@
|
|
|
|
fi
|
|
|
|
|
|
|
|
exec ${NAME} $@
|
2009-11-28 16:38:52 +00:00
|
|
|
|