#!/bin/sh
# Run a StarOffice Linux binary
PREFIX=PUT_PREFIX_HERE
WHAT=`basename $0`

# This will confuse Linux binaries, as they will fail
# if they can't handle a library listed here.
unset LD_PRELOAD

# Has the user installed?  Run the setup tool first if not
if [ ! -f ~/.sd.sh ]; then
	echo User Install required before $WHAT can be run, please wait...
	$PREFIX/StarOffice-3.1/linux-x86/bin/setup
fi

# see if it's there now
if [ -f ~/.sd.sh ]; then
	. ~/.sd.sh
	echo Starting $WHAT, please wait...
	$PREFIX/StarOffice-3.1/linux-x86/bin/$WHAT &
else 
	echo Can\'t find initialisation script ~/.sd.sh, User Install must be
	echo completed before $WHAT can be run.
fi

