summaryrefslogtreecommitdiff
path: root/setup_native/scripts
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2007-10-15 12:35:46 +0000
committerVladimir Glazounov <vg@openoffice.org>2007-10-15 12:35:46 +0000
commitf9066e6294489d96efe48b11a1f02b796e02a9ad (patch)
tree0c5370db9f03add834d5382716f1357e77e39894 /setup_native/scripts
parent4b325a9ea4a02368a50e12e14160101e5f01aa33 (diff)
INTEGRATION: CWS native106 (1.4.14); FILE MERGED
2007/08/13 15:44:32 is 1.4.14.1: #i80641# saving jre for uninstallation
Diffstat (limited to 'setup_native/scripts')
-rw-r--r--setup_native/scripts/javaloader.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/setup_native/scripts/javaloader.sh b/setup_native/scripts/javaloader.sh
index 2488a8999c6d..3775fc1baa5c 100644
--- a/setup_native/scripts/javaloader.sh
+++ b/setup_native/scripts/javaloader.sh
@@ -108,6 +108,26 @@ EOF
exit $errorcode
}
+set_jre_for_uninstall()
+{
+ # if "uninstalldata" exists, this is not required
+ if [ ! -d "uninstalldata" ]; then
+ packagepath="RPMS"
+ jrefile=`find $packagepath -type f -name "jre*.rpm" -print`
+ jrefile=`basename $jrefile`
+ if [ -z "$jrefile" ]; then
+ jrefile="notfound"
+ fi
+
+ # check existence of jre rpm
+ if [ ! -f $packagepath/$jrefile ]; then
+ errortext="Error: Java Runtime Environment (JRE) not found in directory: $packagepath"
+ errorcode="4"
+ do_exit
+ fi
+ fi
+}
+
install_linux_rpm()
{
# Linux requires usage of rpm2cpio to install JRE with user privileges
@@ -434,6 +454,14 @@ if [ "$java_runtime_set" != "yes" ]; then
fi
fi
+# jre for Linux is also required, if java runtime is set (for uninstallation mode)
+if [ "$java_runtime_set" = "yes" ]; then
+ platform=`uname -s`
+ if [ "`uname -s`" = "Linux" ]; then
+ set_jre_for_uninstall
+ fi
+fi
+
start_java
cleanup