From 78a841f1f90440f259c0416e53b8873a4b97d17e Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Thu, 03 May 2007 16:58:05 +0000
Subject: [PATCH] This update to the script fixes a problem where the script would try to invoke the webstart version of the tool if there were any problems with the command line invocation (incorrect arguments etc). Now the webstart version will be launched only if there are no arguments passes to the tool. Otherwise the command line version is used.
---
opends/resource/upgrade.bat | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/opends/resource/upgrade.bat b/opends/resource/upgrade.bat
index d29353f..f4776f3 100644
--- a/opends/resource/upgrade.bat
+++ b/opends/resource/upgrade.bat
@@ -39,7 +39,7 @@
if "%JAVA_HOME%" == "" goto noJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
set JAVA_BIN=%JAVA_HOME%\bin\java.exe
-set jAVAWS_BIN=%JAVA_HOME%\bin\javaws.exe
+set JAVAWS_BIN=%JAVA_HOME%\bin\javaws.exe
if "%*" == "" goto callWebStartUpgrade
goto callExtractor
@@ -47,7 +47,7 @@
if not exist "%INSTANCE_ROOT%\lib\set-java-home.bat" goto noSetJavaHome
call "%INSTANCE_ROOT%\lib\set-java-home.bat"
set JAVA_BIN=%JAVA_HOME%\bin\java.exe
-set jAVAWS_BIN=%JAVA_HOME%\bin\javaws.exe
+set JAVAWS_BIN=%JAVA_HOME%\bin\javaws.exe
if "%*" == "" goto callWebStartUpgrade
goto callExtractor
@@ -75,8 +75,7 @@
set CLASSPATH=""
FOR %%x in ("%INSTANCE_ROOT%\lib\*.jar") DO call "%INSTANCE_ROOT%\lib\setcp.bat" %%x
"%JAVA_BIN%" org.opends.quicksetup.upgrader.BuildExtractor %*
-if %ERRORLEVEL%==0 goto callUpgrader
-goto end
+goto prepUpgrader
:callWebStartUpgrade
rem set JAVAWS_VM_ARGS=-Dorg.opends.quicksetup.upgrader.Root="%INSTANCE_ROOT%"
@@ -84,9 +83,16 @@
"%JAVAWS_BIN%" "%OPENDS_UPGRADE_JNLP%"
goto end
-:callUpgrader
+:prepUpgrader
+if EXIST %INSTANCE_ROOT%\tmp\upgrade goto setClassPathToStageDir
+goto callUpgrader
+
+:setClassPathToStageDir
set CLASSPATH=""
FOR %%x in ("%INSTANCE_ROOT%\tmp\upgrade\lib\*.jar") DO call "%INSTANCE_ROOT%\lib\setcp.bat" %%x
+goto callUpgrader
+
+:callUpgrader
"%JAVA_BIN%" org.opends.quicksetup.upgrader.UpgradeLauncher %*
if EXIST %INSTANCE_ROOT%\tmp\upgrade rd %INSTANCE_ROOT%\tmp\upgrade /s /q
goto end
--
Gitblit v1.10.0