mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-28 06:59:40 -08:00
Merge pull request #314 from prometheus/fix/binary/shell-script
Fix library path determiners.
This commit is contained in:
commit
dad306cf04
|
@ -17,11 +17,12 @@ readonly binary="${0}"
|
||||||
readonly binary_path="$(readlink -f ${binary})"
|
readonly binary_path="$(readlink -f ${binary})"
|
||||||
readonly binary_directory="$(dirname ${binary_path})"
|
readonly binary_directory="$(dirname ${binary_path})"
|
||||||
|
|
||||||
if [ -n "${LD_LIBRARY_PATH}" ]; then
|
readonly platform=$(uname | tr '[:upper:]' '[:lower:]')
|
||||||
export LD_LIBRARY_PATH="${binary_directory}/lib:${LD_LIBRARY_PATH}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
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}"
|
export DYLD_LIBRARY_PATH="${binary_directory}/lib:${DYLD_LIBRARY_PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue