smalltalk
author Claus Gittinger <cg@exept.de>
Fri, 08 Aug 1997 17:58:13 +0200
changeset 243 fd831eff53e0
parent 242 f6879378b04d
child 247 207a28eb1f54
permissions -rwxr-xr-x
*** empty log message ***

#!/bin/sh

# $Header$
#
#
# startup script for smalltalk
# actually, simply calls stx, passing all arguments.
#

# In previous versions, smalltalk used to be the executable itself.
# This lead to problems on systems, where things like LD_LIBRARY_PATH
# should be set in advance. 
# Now, here is a place to do such things ...

#
# -x name specifies an explicit executable
#
if [ "$1" = "-x" ]
then
    shift
    STX=$1
    shift
else
    STX=stx
fi

#
#
# some have Xlibs in /usr/openwin/lib ...
#
if [ -d /usr/openwin/lib ]
then
    if [ "$LD_LIBRARY_PATH" != "" ]
    then
	LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.:/usr/openwin/lib:/usr/local/lib/smalltalk/lib
    else
	LD_LIBRARY_PATH=.:/usr/openwin/lib:/usr/local/lib/smalltalk/lib
    fi
else
    if [ "$LD_LIBRARY_PATH" != "" ]
    then
	LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.:/usr/local/lib/smalltalk/lib
    else
	LD_LIBRARY_PATH=.:/usr/local/lib/smalltalk/lib
    fi
fi

#
# my own libs may be found in STX_LIBDIR/lib
#

if [ "$STX_LIBDIR" != "" ]
then
    if [ "$STX_LIBDIR" != "/usr/local/smalltalk" ]
    then
        LD_LIBRARY_PATH=$STX_LIBDIR/lib:$LD_LIBRARY_PATH
    fi
fi

export LD_LIBRARY_PATH
exec $STX $*