h17229
s 00042/00000/00000
d D 1.1 90/05/23 09:51:23 opcode 1 0
c date and time created 90/05/23 09:51:23 by opcode
e
u
U
f e 0
t
T
I 1
#!/bin/sh

#
# %Z% %M% %I% %E%
#
# Start off the sxnews-helper process with some reasonable
# default values or else prompt the user for OPENWINHOME.
#

#DEFAULTOPENWINHOME=/home/openwin
DEFAULTOPENWINHOME=/usr/local/openwin
HELPER=sxnews-helper

if [ "$OPENWINHOME" = "" ]; then
    echo -n "Please enter your OPENWINHOME path [$DEFAULTOPENWINHOME]: "
    read OPENWINHOME
    if [ "$OPENWINHOME" = "" ]; then
	OPENWINHOME=$DEFAULTOPENWINHOME
    fi
fi

PATH="$OPENWINHOME/bin:$OPENWINHOME/bin/xview:$OPENWINHOME/demo:$PATH"

if [ "$LD_LIBRARY_PATH" = "" ]; then
    LD_LIBRARY_PATH=$OPENWINHOME/lib
else
    LD_LIBRARY_PATH="$OPENWINHOME/lib:$LD_LIBRARY_PATH"
fi

export OPENWINHOME LD_LIBRARY_PATH PATH

which_helper="`which $HELPER`"

if [ "`basename $which_helper`" != $HELPER ]; then
    echo "Error: can't find $HELPER."
    echo "Please make sure that \`\`$HELPER'' is in your path"
    echo "and then run \`\`$0'' again."
    exit 1
fi

echo -n "Starting \`\`$HELPER'' ..."
exec $HELPER
E 1
