Show
Ignore:
Timestamp:
29.04.2010 11:59:42 (9 years ago)
Author:
ak19
Message:

Updating gs3-setup.bat to handle JAVA_HOME and PATH having brackets

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/gs3-setup.bat

    r21320 r21988  
    11@echo off 
     2 
     3setlocal enabledelayedexpansion 
    24 
    35set java_min_version=1.5.0_00 
     
    9294) 
    9395 
    94 if not "%FOUNDJAVAHOME%"=="" ( 
    95   set JAVA_HOME=%FOUNDJAVAHOME% 
    96   set PATH=%FOUNDJAVAHOME%\bin;%PATH% 
    97   set RUNJAVA=%FOUNDJAVAHOME%\bin\java.exe 
     96if DEFINED FOUNDJAVAHOME ( 
     97  set JAVA_HOME=!FOUNDJAVAHOME! 
     98  set PATH=!FOUNDJAVAHOME!\bin;!PATH! 
     99  set RUNJAVA=!FOUNDJAVAHOME!\bin\java.exe 
    98100  goto summaryThenEnd 
    99101) 
    100102 
    101 if not "%FOUNDJREHOME%"=="" ( 
    102   set JRE_HOME=%FOUNDJREHOME% 
    103   set PATH=%FOUNDJREHOME%\bin;%PATH% 
    104   set RUNJAVA=%FOUNDJREHOME%\bin\java.exe 
     103if DEFINED FOUNDJREHOME ( 
     104  set JRE_HOME=!FOUNDJREHOME! 
     105  set PATH=!FOUNDJREHOME!\bin;!PATH! 
     106  set RUNJAVA=!FOUNDJREHOME!\bin\java.exe 
    105107  goto summaryThenEnd 
    106108)