Changeset 27833

Show
Ignore:
Timestamp:
12.07.2013 23:01:12 (6 years ago)
Author:
davidb
Message:

Additional work to help support Greenstone running off a read-only medium, such as a DVD

Files:
1 modified

Legend:

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

    r18720 r27833  
    1616if "%GSDL3SRCHOME%" == "" call "%GSDL3PATH%\gs3-setup.bat" SetEnv > nul 
    1717 
     18 
     19:: See if Greenstone3 web folder is writable 
     20  echo. 
     21  echo Checking if the Greenstone3 web directory is writable ... 
     22  (echo This is a temporary file. It is safe to delete it. > "!GSDL3HOME!\testing.tmp" ) 2>nul 
     23  if exist "%GSDL3HOME%\testing.tmp" goto isWritable 
     24 
     25:: Is read-only 
     26  set gsdl3_writablehome=%TMP%\greenstone\web 
     27  set opt_properties=-Dgsdl3home.isreadonly=true -Dgsdl3.writablehome=%gsdl3_writablehome% 
     28  echo ... no. 
     29  echo Setting Greenstone3 web home writable area to be: %gsdl3_writablehome% 
     30  goto runJava 
     31 
     32:isWritable 
     33  del "%GSDL3HOME%\testing.tmp" 
     34  set opt_properties= 
     35  echo  ... yes. 
     36 
     37:runJava 
     38 
    1839set GSDL3PATH= 
    1940 
    20 "%RUNJAVA%" -cp "%CLASSPATH%" org.greenstone.server.Server3 "%GSDL3SRCHOME%" 
     41"%RUNJAVA%" -cp "%CLASSPATH%" %opt_properties% org.greenstone.server.Server3 "%GSDL3SRCHOME%" 
    2142 
    2243