2009-06-02 21:01:19 +00:00
|
|
|
#!/bin/sh
|
2009-06-02 17:33:04 +00:00
|
|
|
|
2010-05-17 10:27:32 +00:00
|
|
|
# this wrapper will not work under BSD systems or others
|
|
|
|
# not containig the GNU readlink.
|
|
|
|
# Under those, wrapper.c will forcibly be used
|
|
|
|
# regardless of the config file setting.
|
|
|
|
|
2009-08-02 14:45:43 +00:00
|
|
|
canonicalizedname=$(readlink -nm "${0}")
|
|
|
|
dirname="$(dirname "${canonicalizedname}")"
|
|
|
|
basename="$(basename "${canonicalizedname}")"
|
2009-06-02 17:33:04 +00:00
|
|
|
|
|
|
|
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
|
2009-06-02 21:01:19 +00:00
|
|
|
exec "${dirname}/.${basename}" "$@"
|