crosstool-ng/scripts/wrapper.in

16 lines
395 B
Plaintext
Raw Normal View History

#!/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}" "$@"