1 |
From 3b77bbe76b9f99d871074e8baa6e0845f4756442 Mon Sep 17 00:00:00 2001 |
2 |
From: David Tardon <dtardon@redhat.com> |
3 |
Date: Mon, 3 Feb 2014 20:24:50 +0100 |
4 |
Subject: [PATCH] i#86080 unopkg bodge |
5 |
|
6 |
--- |
7 |
desktop/scripts/unopkg.sh | 33 +++++++++++++++++++++++++++++++-- |
8 |
1 file changed, 31 insertions(+), 2 deletions(-) |
9 |
|
10 |
diff --git a/desktop/scripts/unopkg.sh b/desktop/scripts/unopkg.sh |
11 |
index d16d226..aefc918 100755 |
12 |
--- a/desktop/scripts/unopkg.sh |
13 |
+++ b/desktop/scripts/unopkg.sh |
14 |
@@ -53,6 +53,33 @@ AIX) |
15 |
;; |
16 |
esac |
17 |
|
18 |
+isnotuser=0 |
19 |
+for arg in $@ |
20 |
+do |
21 |
+if [ "$arg" = "--shared" -o "$arg" = "--bundled" ]; then |
22 |
+ isnotuser=1 |
23 |
+fi |
24 |
+done |
25 |
+if [ $isnotuser -eq 1 ]; then |
26 |
+ echo $@ | grep -q env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY |
27 |
+ if [ $? -ne 0 ]; then |
28 |
+ set -- $@ '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' |
29 |
+ fi |
30 |
+ echo $@ | grep -q env:UNO_JAVA_JFW_INSTALL_DATA |
31 |
+ if [ $? -ne 0 -a -w $sd_prog/../share/config/javasettingsunopkginstall.xml ]; then |
32 |
+ set -- $@ '-env:UNO_JAVA_JFW_INSTALL_DATA=$$ORIGIN/../share/config/javasettingsunopkginstall.xml' |
33 |
+ fi |
34 |
+ echo $@ | grep -q env:UserInstallation |
35 |
+ if [ $? -ne 0 ]; then |
36 |
+ INSTDIR=`/bin/mktemp -d --tmpdir unoinstall.XXXXXX` |
37 |
+ if [ $? -ne 0 ]; then |
38 |
+ echo "Could not create tmp dir" >&2 |
39 |
+ exit 1 |
40 |
+ fi |
41 |
+ set -- $@ '-env:UserInstallation=file://'$INSTDIR |
42 |
+ fi |
43 |
+fi |
44 |
+ |
45 |
#collect all bootstrap variables specified on the command line |
46 |
#so that they can be passed as arguments to javaldx later on |
47 |
for arg in $@ |
48 |
@@ -92,6 +119,8 @@ unset XENVIRONMENT |
49 |
# SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS |
50 |
|
51 |
# execute binary |
52 |
-exec "$sd_prog/unopkg.bin" "$@" \ |
53 |
+"$sd_prog/unopkg.bin" "$@" \ |
54 |
"-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc" |
55 |
- |
56 |
+if [ -n "$INSTDIR" ]; then |
57 |
+ rm -rf $INSTDIR |
58 |
+fi |
59 |
-- |
60 |
1.8.4.2 |
61 |
|