Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > cd8ce32c919af60229fca1d7f792c60e > files > 24

openoffice.org-3.2.0-12.35.fc13.src.rpm

--- openoffice.org.orig/desktop/scripts/unopkg.sh	2008-01-14 15:55:26.000000000 +0000
+++ openoffice.org/desktop/scripts/unopkg.sh	2008-02-14 10:52:10.000000000 +0000
@@ -47,6 +47,29 @@
 sd_prog=`pwd`
 cd "$sd_cwd"
 
+isshared=0
+for arg in $@
+do
+if [ "$arg" = "--shared" ]; then 
+    isshared=1
+fi
+done
+if [ $isshared -eq 1 ]; then
+    echo $@ | grep -q env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY
+    if [ $? -ne 0 ]; then
+        set -- $@ '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+    fi
+    echo $@ | grep -q env:UNO_JAVA_JFW_INSTALL_DATA
+    if [ $? -ne 0 -a -w $sd_prog/../share/config/javasettingsunopkginstall.xml ]; then
+        set -- $@ '-env:UNO_JAVA_JFW_INSTALL_DATA=$$ORIGIN/../share/config/javasettingsunopkginstall.xml'
+    fi
+    echo $@ | grep -q env:UserInstallation
+    if [ $? -ne 0 ]; then
+        INSTDIR=`/bin/mktemp -d --tmpdir unoinstall.XXXXXX`
+        set -- $@ '-env:UserInstallation=file://'$INSTDIR
+    fi
+fi
+
 #collect all bootstrap variables specified on the command line
 #so that they can be passed as arguments to javaldx later on
 for arg in $@
@@ -76,6 +99,8 @@
 export PATH
 
 # execute binary
-exec "$sd_prog/unopkg.bin" "$@" \
+"$sd_prog/unopkg.bin" "$@" \
     "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"
-
+if [ -n "$INSTDIR" ]; then
+   rm -rf $INSTDIR
+fi