From f54aeb79b0f90d550c8cdcac5bfc22d4fc4579ce Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Thu, 12 Apr 2007 21:17:33 +0000
Subject: [PATCH] - The upgrader now contains a small companion program BuildExtractor that is run prior to Upgrader that extacts the user specified build file.  This is done to allow upgrader to run from the new builds bits as opposed to the current build's bits.

---
 opends/resource/upgrade |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/opends/resource/upgrade b/opends/resource/upgrade
index e97ccb2..ded1a18 100644
--- a/opends/resource/upgrade
+++ b/opends/resource/upgrade
@@ -82,7 +82,11 @@
 
 
 # Configure the appropriate CLASSPATH to test.
-CLASSPATH=${INSTANCE_ROOT}/classes
+for JAR in ${INSTANCE_ROOT}/tmp/upgrade/lib/*.jar
+do
+  CLASSPATH=${CLASSPATH}:${JAR}
+done
+CLASSPATH=${CLASSPATH}:${INSTANCE_ROOT}/classes
 for JAR in ${INSTANCE_ROOT}/lib/*.jar
 do
   CLASSPATH=${CLASSPATH}:${JAR}
@@ -115,6 +119,15 @@
   fi
 fi
 
+if [ -r "./tmp/upgrade" ]
+then
+  rm -fr "./tmp/upgrade"
+fi
+# Launch the build extractor.
+"${JAVA_BIN}" org.opends.quicksetup.upgrader.BuildExtractor "${@}"
 
-# Launch the uninstall process.
-"${JAVA_BIN}" org.opends.quicksetup.upgrader.UpgradeLauncher "${@}"
+if test ${?} -eq 0
+then
+  # Launch the upgrade process.
+  "${JAVA_BIN}" org.opends.quicksetup.upgrader.UpgradeLauncher "${@}"
+fi

--
Gitblit v1.10.0