Changeset 31471

Show
Ignore:
Timestamp:
07.03.2017 19:32:33 (3 years ago)
Author:
ak19
Message:

Removed dangerous trailing whitespace when setting environment variable

Files:
1 modified

Legend:

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

    r31470 r31471  
    168168:: http://stackoverflow.com/questions/6474738/batch-file-for-f-doesnt-work-if-path-has-spaces 
    169169:: Could use shortfilenames, see http://stackoverflow.com/questions/10227144/convert-long-filename-to-short-filename-8-3-using-cmd-exe 
    170 for /f "usebackq tokens=2 delims= " %%G IN (`call "%GSDLHOME%\bin\windows\GNUfile\bin\file.exe" "%GSDL3SRCHOME%\bin\search4j.exe"`) do set bitness=%%G 
     170if not exist "!GSDL3SRCHOME!\lib\jni\gdbmjava.dll" set bitness=UNKNOWN& goto testjavahome 
     171for /f "usebackq tokens=2 delims= " %%G IN (`call "!GSDLHOME!\bin\windows\GNUfile\bin\file.exe" "!GSDL3SRCHOME!\lib\jni\gdbmjava.dll"`) do set bitness=%%G 
    171172 
    172173if "%bitness%" == "PE32+" ( 
     
    198199    if !ERRORLEVEL! equ 1 echo *** The detected JDK java is incompatible with !bitness! bit GS& goto testjre     
    199200    if !ERRORLEVEL! equ 0 ( 
    200         echo *** The detected JDK java is a matching %bitness% bit       
     201        echo *** The detected JDK java is a matching %bitness% bit 
    201202        goto setupjavahome 
    202203    )    
     
    209210    "!FOUNDJREHOME!\bin\java.exe" -d%bitness% -version 2> nul 
    210211    if !ERRORLEVEL! equ 1 echo *** The detected JRE java is incompatible with !bitness! bit GS& goto testbundledjre 
    211     if !ERRORLEVEL! equ 0 (  
     212    if !ERRORLEVEL! equ 0 ( 
    212213        rem The JRE_HOME found by search4j may be the bundled JRE, overriding any system JRE_HOME, 
    213         rem because the bundled JRE_HOME was provided as HINT to search4j.       
    214         echo *** The detected JRE java is a matching %bitness% bit           
     214        rem because the bundled JRE_HOME was provided as HINT to search4j. 
     215        echo *** The detected JRE java is a matching %bitness% bit 
    215216        goto setupjrehome 
    216217    )    
     
    225226    "!BUNDLED_JRE!\bin\java.exe" -d%bitness% -version 2> nul 
    226227    if !ERRORLEVEL! equ 1 echo *** The detected JRE java is incompatible with !bitness! bit& goto setupjavahome 
    227     if !ERRORLEVEL! equ 0 (  
    228         echo *** The detected JRE java is a matching %bitness% bit           
     228    if !ERRORLEVEL! equ 0 ( 
     229        echo *** The detected JRE java is a matching %bitness% bit 
    229230        goto bundledjre 
    230231    ) 
     
    249250if DEFINED FOUNDJAVAHOME  ( 
    250251    echo *** Using the JAVA_HOME detected at !FOUNDJAVAHOME! 
    251     set JAVA_HOME=!FOUNDJAVAHOME!    
     252    set JAVA_HOME=!FOUNDJAVAHOME! 
    252253    set PATH=!FOUNDJAVAHOME!\bin;!PATH! 
    253254    set RUNJAVA=!FOUNDJAVAHOME!\bin\java.exe