From 66559b44c732762778da937bfc689c289b3907c9 Mon Sep 17 00:00:00 2001
From: pvarga <pvarga@opentext.com>
Date: Mon, 11 Jul 2016 22:36:23 +0000
Subject: [PATCH] OPENDJ-1976 setup.bat doesn't work without 8.3 format
---
opendj-server-legacy/resource/setup.bat | 6 +++---
opendj-server-legacy/resource/upgrade.bat | 6 +++---
opendj-server-legacy/resource/uninstall.bat | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/opendj-server-legacy/resource/setup.bat b/opendj-server-legacy/resource/setup.bat
index d000204..a2840af 100644
--- a/opendj-server-legacy/resource/setup.bat
+++ b/opendj-server-legacy/resource/setup.bat
@@ -19,18 +19,18 @@
rem check that the path does not contain the ^% character which breaks
rem the batch files.
-for %%i in (%~sf0) do set NON_ESCAPED=%%~dPsi..
+set NON_ESCAPED=%~dp0..
FOR /F "tokens=1-2* delims=%%" %%1 IN ("%NON_ESCAPED%") DO (
if NOT "%%2" == "" goto invalidPath)
-for %%i in (%~sf0) do set DIR_HOME=%%~dPsi.
+set DIR_HOME=%~dp0.
set INSTALL_ROOT=%DIR_HOME%
set INSTANCE_DIR=
if exist "%INSTALL_ROOT%\instance.loc" (
- set /p INSTANCE_DIR=<%INSTALL_ROOT%\instance.loc
+ set /p INSTANCE_DIR=<"%INSTALL_ROOT%\instance.loc"
) else (
set INSTANCE_DIR=.
)
diff --git a/opendj-server-legacy/resource/uninstall.bat b/opendj-server-legacy/resource/uninstall.bat
index 74e4919..330bfe9 100644
--- a/opendj-server-legacy/resource/uninstall.bat
+++ b/opendj-server-legacy/resource/uninstall.bat
@@ -16,12 +16,12 @@
rem Portions Copyright 2011-2012 ForgeRock AS.
setlocal
-for %%i in (%~sf0) do set DIR_HOME=%%~dPsi.
+set DIR_HOME=%~dp0.
set INSTALL_ROOT=%DIR_HOME%
set INSTANCE_DIR=
if exist "%INSTALL_ROOT%\instance.loc" (
- set /p INSTANCE_DIR=<%INSTALL_ROOT%\instance.loc
+ set /p INSTANCE_DIR=<"%INSTALL_ROOT%\instance.loc"
) else (
set INSTANCE_DIR=.
)
diff --git a/opendj-server-legacy/resource/upgrade.bat b/opendj-server-legacy/resource/upgrade.bat
index 4ca0d4e..c114ebd 100644
--- a/opendj-server-legacy/resource/upgrade.bat
+++ b/opendj-server-legacy/resource/upgrade.bat
@@ -19,11 +19,11 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.upgrade.UpgradeCli"
set SCRIPT_NAME=upgrade
-for %%i in (%~sf0) do set DIR_HOME=%%~dPsi
+set DIR_HOME=%~dp0
set INSTALL_ROOT=%DIR_HOME%
set INSTANCE_DIR=
if exist "%INSTALL_ROOT%\instance.loc" (
- set /p INSTANCE_DIR=<%INSTALL_ROOT%\instance.loc
+ set /p INSTANCE_DIR=<"%INSTALL_ROOT%\instance.loc"
) else (
set INSTANCE_DIR=.
)
@@ -46,5 +46,5 @@
mkdir %DIR_CLASSES%
:end
-for %%i in (%~sf0) do call "%%~dPsi\lib\_server-script.bat" %*
+call "%~dp0\lib\_server-script.bat" %*
--
Gitblit v1.10.0