Fix library path determiners.

This commit is contained in:
Matt T. Proud 2013-06-24 13:13:58 +02:00
parent 81c406630a
commit aabf206fb5
1 changed files with 5 additions and 4 deletions

View File

@ -17,11 +17,12 @@ readonly binary="${0}"
readonly binary_path="$(readlink -f ${binary})"
readonly binary_directory="$(dirname ${binary_path})"
if [ -n "${LD_LIBRARY_PATH}" ]; then
export LD_LIBRARY_PATH="${binary_directory}/lib:${LD_LIBRARY_PATH}"
fi
readonly platform=$(uname | tr '[:upper:]' '[:lower:]')
if [ -n "${DYLD_LIBRARY_PATH}" ]; then
export LD_LIBRARY_PATH="${binary_directory}/lib:${LD_LIBRARY_PATH}"
if [[ "${platform}" == "darwin" ]]; then
export DYLD_LIBRARY_PATH="${binary_directory}/lib:${DYLD_LIBRARY_PATH}"
fi