mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
8aef3d560c
git-svn-id: file:///home/svn/framework3/trunk@7694 4d416f70-5f16-0410-b530-b9f4589650da
32 lines
510 B
Bash
Executable File
32 lines
510 B
Bash
Executable File
#!/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
|
|
unset GEM_PATH
|
|
unset GEM_HOME
|
|
unset MY_RUBY_HOME
|
|
unset RUBY_VERSION
|
|
unset RUBY_OPTS
|
|
|
|
if [ -f "${BASE}/msf3/${NAME}" ]; then
|
|
exec ${BASE}/msf3/${NAME} $@
|
|
fi
|
|
|
|
exec ${NAME} $@
|
|
|