[wsas-java-dev] svn commit r4634 - trunk/wsas/java/modules/core/bin

svn at wso2.org svn at wso2.org
Mon Jul 2 03:35:38 PDT 2007


Author: suran
Date: Mon Jul  2 03:35:18 2007
New Revision: 4634

Modified:
   trunk/wsas/java/modules/core/bin/install.bat
Log:
Made changes to install.bat so that it can be invoked from anywhere within the 
file system, provided the WSO2WSAS_HOME variable is correctly set.
Even if it's not, install can still be run from the within the bin folder.

Modified: trunk/wsas/java/modules/core/bin/install.bat
==============================================================================
--- trunk/wsas/java/modules/core/bin/install.bat	(original)
+++ trunk/wsas/java/modules/core/bin/install.bat	Mon Jul  2 03:35:18 2007
@@ -40,14 +40,21 @@
 rem guess the home. Jump one directory up to check if that is the home
 cd ..
 set WSO2WSAS_HOME=%cd%
-cd %CURRENT_DIR%
+cd %CURRENT_DIR% >> NULL
 
 :gotHome
-if exist "%WSO2WSAS_HOME%\bin\install.bat" goto okHome
+if not exist "%WSO2WSAS_HOME%\bin\install.bat" goto pathError
+
+SET curDrive=%cd:~0,1%
+SET wsasDrive=%WSO2WSAS_HOME:~0,1%
+if not "%curDrive%" == "%wsasDrive%" %wsasDrive%:
+
+goto okHome
 
 set WSO2WSAS_HOME=%~dp0..
 if exist "%WSO2WSAS_HOME%\bin\install.bat" goto okHome
 
+:pathError
 echo The WSO2WSAS_HOME environment variable is not defined correctly
 echo This environment variable is needed to run this program
 goto end
@@ -60,6 +67,7 @@
 if "%GERONIMO_HOME%" == "" set GERONIMO_HOME="INVALID"
 if "%JAVA_HOME%" == "" set JAVA_HOME="INVALID"
 
+cd %WSO2WSAS_HOME%
 set WSO2WSAS_CLASSPATH="%WSO2WSAS_HOME%\conf";%WSO2WSAS_CLASSPATH%
 FOR %%C in (.\lib\*.jar) DO set WSO2WSAS_CLASSPATH=!WSO2WSAS_CLASSPATH!;.\lib\%%~nC%%~xC
 "%JAVA_HOME%\bin\java.exe" -cp %WSO2WSAS_CLASSPATH% org.wso2.wsas.installer.InstallationManager -java_home "%JAVA_HOME%" -tomcat_home "%CATALINA_HOME%" -jboss_home "%JBOSS_HOME%"  -geronimo_home "%GERONIMO_HOME%"
@@ -69,7 +77,7 @@
 if "%GERONIMO_HOME%" == "INVALID" set GERONIMO_HOME=""
 if "%JAVA_HOME%" == "INVALID" set JAVA_HOME=""
 
-cd %CURRENT_DIR%
+cd %CURRENT_DIR% >> NULL
 endlocal
 rem pause so that the user is able to see the messages
 pause




More information about the Wsas-java-dev mailing list