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..70cb5d3 --- /dev/null +++ b/scripts/wrapper.in @@ -0,0 +1,15 @@ +#!@@CT_bash@@ +# There are bashisms on the last line + +dirname="$(dirname "${0}")" +basename="$(basename "${0}")" + +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 -a "${basename}" "${dirname}/.${basename}" "$@" |