From aabf206fb51ebc9117d79bd32ced3cd7a1b8ae59 Mon Sep 17 00:00:00 2001 From: "Matt T. Proud" Date: Mon, 24 Jun 2013 13:13:58 +0200 Subject: [PATCH] Fix library path determiners. --- build/package/run_prometheus.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build/package/run_prometheus.sh b/build/package/run_prometheus.sh index c433453b8..f79e8319d 100755 --- a/build/package/run_prometheus.sh +++ b/build/package/run_prometheus.sh @@ -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