2022-10-17 20:45:32 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
2022-10-27 03:29:40 +03:00
|
|
|
exe=$(basename "$0")
|
2022-10-17 20:45:32 +03:00
|
|
|
|
|
|
|
if test -z "$TEA_PREFIX"
|
|
|
|
then
|
2022-10-27 03:29:40 +03:00
|
|
|
echo 'TEA_PREFIX mysteriously unset' >&2
|
2022-10-17 20:45:32 +03:00
|
|
|
exit 1
|
|
|
|
else
|
2022-10-27 03:29:40 +03:00
|
|
|
# At a minimum, `ld` will complain if you mix the `-r` and `-rpath` flags,
|
|
|
|
# so if any argument to this script is `-r`, we just pass through without
|
|
|
|
# additions.
|
|
|
|
for word in "$@"; do
|
|
|
|
if test "$word" = "-r"; then
|
|
|
|
exec /usr/bin/"$exe" "$@"
|
|
|
|
fi
|
|
|
|
done
|
2022-10-17 20:45:32 +03:00
|
|
|
exec /usr/bin/"$exe" "$@" -rpath "$TEA_PREFIX"
|
|
|
|
fi
|