mirror of
https://github.com/ivabus/pantry
synced 2024-11-27 02:35:08 +03:00
23 lines
490 B
Bash
Executable file
23 lines
490 B
Bash
Executable file
#!/bin/sh
|
|
|
|
exe=$(basename "$0")
|
|
|
|
if test ! -f /usr/bin/"$exe"; then
|
|
exe=ld
|
|
fi
|
|
|
|
if test -z "$TEA_PREFIX"
|
|
then
|
|
echo 'TEA_PREFIX mysteriously unset' >&2
|
|
exit 1
|
|
else
|
|
# 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
|
|
exec /usr/bin/"$exe" "$@" -rpath "$TEA_PREFIX"
|
|
fi
|