3 # Function to find the real directory a program resides in.
4 # Feb. 17, 2000 - Sam Lantinga, Loki Entertainment Software
7 fullpath="`echo $1 | grep /`"
8 if [ "$fullpath" = "" ]; then
12 do if [ -x "$path/$1" ]; then
13 if [ "$path" = "" ]; then
22 if [ "$fullpath" = "" ]; then
26 # Is the sed/ls magic portable?
27 if [ -L "$fullpath" ]; then
28 #fullpath="`ls -l "$fullpath" | awk '{print $11}'`"
29 fullpath=`ls -l "$fullpath" |sed -e 's/.* -> //' |sed -e 's/\*//'`
37 if [ ! -f "$here/lib/patch.dat" ] ; then
38 echo "$0: Fatal error: missing data files (*.dat) in $here/lib"
39 echo "If you have just installed the patch to the full version of the game"
40 echo "you will need to copy *.dat from your existing uplink installation"
43 export LD_LIBRARY_PATH="$here/lib:$LD_LIBRARY_PATH"
44 $here/lib/uplink.bin.x86 "$@"