Files
metasploit-gs/external/installer-linux/scripts/run.sh
T
HD Moore 7b8d08a635 Fixes #466 and #467. Binaries and source to be stored outside the tree
git-svn-id: file:///home/svn/framework3/trunk@7372 4d416f70-5f16-0410-b530-b9f4589650da
2009-11-06 02:55:18 +00:00

26 lines
425 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
if [ -f "${BASE}/msf3/${NAME}" ]; then
exec ${BASE}/msf3/${NAME} $@
fi
exec ${NAME} $@