diff options
Diffstat (limited to 'scripts/wrapper.in')
-rw-r--r-- | scripts/wrapper.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/wrapper.in b/scripts/wrapper.in new file mode 100644 index 0000000..1c501eb --- /dev/null +++ b/scripts/wrapper.in @@ -0,0 +1,15 @@ +#!/bin/sh + +canonicalizedname=$(readlink -nm "${0}") +dirname="$(dirname "${canonicalizedname}")" +basename="$(basename "${canonicalizedname}")" + +ld_lib_path="$(dirname "${dirname}")/lib" + +case ":${LD_LIBRARY_PATH}:" in + *":${ld_lib_path}:"*) ;; + *) LD_LIBRARY_PATH="${ld_lib_path}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}";; +esac + +export LD_LIBRARY_PATH +exec "${dirname}/.${basename}" "$@" |