#!/bin/sh
#
#	$NetBSD: soffice,v 1.1.1.1 1999/11/22 21:23:49 rh Exp $
#
SOINST=@@PREFIX@@/Office51
[ "$SOFFICE" = "" ] && SOFFICE=$HOME/Office51

if [ ! -d "$SOFFICE" ]; then
	echo ""
	echo "-----------------------------------------------------------------"
	echo "  StarOffice has not yet been set up for `whoami`."
	echo "  Starting setup ...                                             "
	echo ""
	echo "  (If StarOffice has already been set up for `whoami` or you"
	echo "  want to install it someplace other than $SOFFICE"
	echo "  please abort the installation procedure now, set the \$SOFFICE "
	echo "  environment variable accordingly and rerun $0.)"
	echo "-----------------------------------------------------------------"
	echo ""

	@@PREFIX@@/bin/sosetup

	echo ""
	echo "Done.  Starting StarOffice ..."
	echo ""
fi

export LD_LIBRARY_PATH=@@PREFIX@@/Office51:@@PREFIX@@/Office51/lib:${SOFFICE}:${SOFFICE}/lib
exec ${SOINST}/bin/soffice $*
