summaryrefslogtreecommitdiff
path: root/misc/openoffice-bin/files/soffice
diff options
context:
space:
mode:
Diffstat (limited to 'misc/openoffice-bin/files/soffice')
-rwxr-xr-xmisc/openoffice-bin/files/soffice60
1 files changed, 60 insertions, 0 deletions
diff --git a/misc/openoffice-bin/files/soffice b/misc/openoffice-bin/files/soffice
new file mode 100755
index 00000000000..4bfcaa6b3f5
--- /dev/null
+++ b/misc/openoffice-bin/files/soffice
@@ -0,0 +1,60 @@
+#!/bin/sh
+#
+# $NetBSD: soffice,v 1.1.1.1 2005/02/24 13:50:20 mrauch Exp $
+#
+SOINST=@@PREFIX@@/OpenOffice.org@@OO_VER@@
+[ "$SOFFICE" = "" ] && SOFFICE=$HOME/OpenOffice.org@@OO_VER@@
+
+if [ ! -d "$SOFFICE" ]; then
+ echo ""
+ echo "-----------------------------------------------------------------"
+ echo " OpenOffice has not yet been set up for `whoami`."
+ echo " Starting setup ... "
+ echo ""
+ echo " (If OpenOffice 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 ""
+
+ # add an existing java directory to $PATH to allow OO to
+ # automatically find it
+ #
+ if [ -n "$JAVA_HOME" -a -f "$JAVA_HOME/bin/java" ]; then
+ export PATH=$PATH:$JAVA_HOME/bin
+ fi
+
+ cd $SOINST
+ BASENAME=`basename $0`
+ TMPFILE=`mktemp -q /tmp/$BASENAME.XXXXXX`
+ if [ $? -ne 0 ]; then
+ echo "$0: Can't create temp file, exiting..."
+ exit 1
+ fi
+ cat << EOF >> ${TMPFILE}
+[ENVIRONMENT]
+INSTALLATIONMODE=INSTALL_WORKSTATION
+INSTALLATIONTYPE=WORKSTATION
+DESTINATIONPATH=$SOFFICE
+OUTERPATH=
+LOGFILE=
+
+EOF
+ ./setup -nogui -r:${TMPFILE}
+ rm -f ${TMPFILE}
+
+ echo ""
+ echo "Done. Starting OpenOffice ..."
+ echo ""
+fi
+
+# We've got a large number of shared libraries and other single files which
+# have to be open for normal operation
+ulimit -n `ulimit -n -H`
+if [ -z $PTHREAD_DIAGASSERT ]; then
+PTHREAD_DIAGASSERT=AEL
+export PTHREAD_DIAGASSERT
+fi
+
+exec ${SOFFICE}/soffice "$@"