summaryrefslogtreecommitdiff
path: root/misc/openoffice-linux
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2003-02-11 11:34:15 +0000
committerjlam <jlam@pkgsrc.org>2003-02-11 11:34:15 +0000
commit5f3204cc00d6239be51fa9ea2ed5f4a36b6e175f (patch)
tree3a92103c9a4e05d33118075c3a353f89de7b7aba /misc/openoffice-linux
parent8afcf18f31135f4247c1a8ec913a6a7955a17842 (diff)
downloadpkgsrc-5f3204cc00d6239be51fa9ea2ed5f4a36b6e175f.tar.gz
Be a bit more loose about which JVM to use by respecting JAVA_HOME. Also
properly quote the arguments to soffice.
Diffstat (limited to 'misc/openoffice-linux')
-rwxr-xr-xmisc/openoffice-linux/files/soffice15
1 files changed, 9 insertions, 6 deletions
diff --git a/misc/openoffice-linux/files/soffice b/misc/openoffice-linux/files/soffice
index 39494f8ba61..9a0afc7fc27 100755
--- a/misc/openoffice-linux/files/soffice
+++ b/misc/openoffice-linux/files/soffice
@@ -1,11 +1,11 @@
#!/bin/sh
#
-# $NetBSD: soffice,v 1.1.1.1 2003/01/22 21:57:53 mrauch Exp $
+# $NetBSD: soffice,v 1.2 2003/02/11 11:34:15 jlam Exp $
#
SOINST=@@PREFIX@@/OpenOffice.org1.0.2
[ "$SOFFICE" = "" ] && SOFFICE=$HOME/OpenOffice.org1.0.2
-if [ `uname -s`=="NetBSD" -a ! -r /emul/linux/etc/mtab ]; then
+if [ `uname -s` = "NetBSD" -a ! -r /emul/linux/etc/mtab ]; then
echo 'ERROR: Before you are able to use this package, the file'
echo ' /emul/linux/etc/mtab must exist.'
echo ' Ask your system administrator to create this file,'
@@ -26,9 +26,12 @@ if [ ! -d "$SOFFICE" ]; then
echo "-----------------------------------------------------------------"
echo ""
-# add an eventually existing java directory to $PATH to allow OO to
-# automatically find it
- export PATH=$PATH:@@PREFIX@@/java/bin
+ # 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
./setup
@@ -42,4 +45,4 @@ fi
# have to be open for normal operation
ulimit -n 1024
-exec ${SOFFICE}/soffice $*
+exec ${SOFFICE}/soffice "$@"