Changeset 30574 for main/trunk/gli

Show
Ignore:
Timestamp:
16.06.2016 19:20:23 (3 years ago)
Author:
ak19
Message:

Improving dispersed GS3: changes to util.pm fix the bug whereby the perl code always write to gs2build\tmp when building, even if the Greenstone folder is not writable. Now the TMP env var location is used and the tmp files get written to TMP\greenstone\web when the GS folder is not writable. Further tidied up bat and cmd files to remove extra variables, to break out of loop reading in build.properties file when the necessary properties are found.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/gli.bat

    r30573 r30574  
    167167 
    168168    rem In a web-dispersed GS3 set up like in the labs, gsdl3home.isreadonly would be true and 
    169     rem we need to run the web server in read-only mode. This section of code borrowed from gs3-server.bat. 
    170     set USE_TMPDIR_FOR_TOMCAT= 
     169    rem we need to run the web server in read-only mode. This section of code borrowed from gs3-server.bat.  
    171170    for /F "tokens=1,2 delims==" %%G in (%GSDL3SRCHOME%\build.properties) do (  
    172         if "%%G"=="gsdl3home.isreadonly" set USE_TMPDIR_FOR_TOMCAT=%%H 
    173     )    
    174     if "%USE_TMPDIR_FOR_TOMCAT%" == "true" ( 
    175         set gsdl3_writablehome=%TMP%\greenstone\web 
    176         set opt_properties="-Dgsdl3home.isreadonly=true" -Dgsdl3.writablehome="%gsdl3_writablehome%" 
    177         echo Setting Greenstone3 web home writable area to be: %gsdl3_writablehome% 
    178         pushd %GSDL3SRCHOME% 
    179         cmd /c ant.bat %opt_properties% configure-web 
    180         popd 
     171        if "%%G"=="gsdl3home.isreadonly" if "%%H" == "true" ( 
     172            set gsdl3_writablehome=%TMP%\greenstone\web 
     173            :: not used 
     174            set opt_properties="-Dgsdl3home.isreadonly=true" -Dgsdl3.writablehome="%gsdl3_writablehome%" 
     175            echo Setting Greenstone3 web home writable area to be: %gsdl3_writablehome% 
     176            pushd %GSDL3SRCHOME% 
     177            :: passing opt_properties is no longer necessary because ant.bat is unmodified (doesn't make use of it)  
     178            :: and because build.xml already contains the properties with the correct values 
     179            cmd /c ant.bat %opt_properties% configure-web 
     180            popd 
     181        ) 
    181182    ) 
    182183