1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-12 11:52:01 +01:00
metasploit-framework/external/installer-linux/scripts/run.sh
HD Moore 8aef3d560c Fixes #579
git-svn-id: file:///home/svn/framework3/trunk@7694 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-04 11:35:24 +00:00

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} $@