mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-19 12:57:53 +00:00
98e7576024
Documented that the call to readlink will not work on BSD systems.
21 lines
575 B
Bash
21 lines
575 B
Bash
#!/bin/sh
|
|
|
|
# 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.
|
|
|
|
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}" "$@"
|