source: main/trunk/greenstone3/gs3-server.bat@ 27864

Last change on this file since 27864 was 27864, checked in by davidb, 11 years ago

Changed to triggering ant command to ensure gsdl-writablehome is correctly initialized

  • Property svn:keywords set to Author Date Id Revision
File size: 1.5 KB
Line 
1@echo off
2
3echo Greenstone 3 Server
4echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
5echo This software comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
6echo This is free software, and you are welcome to redistribute it
7
8:: ---- Determine GSDL3HOME ----
9:: Some users may set the above line manually
10set GSDL3PATH=
11
12:: The default location is the current directory
13 if "%GSDL3PATH%" == "" set GSDL3PATH=.
14
15:: Setup Greenstone, unless it has already been done
16if "%GSDL3SRCHOME%" == "" call "%GSDL3PATH%\gs3-setup.bat" SetEnv > nul
17
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
31 :: Calling ant target to initialize the gsdl3-writablehome area
32 :: ... including the all important global.properties.
33 ant.bat %opt_properties% configure-web
34
35 goto runJava
36
37:isWritable
38 del "%GSDL3HOME%\testing.tmp"
39 set opt_properties=
40 echo ... yes.
41
42:runJava
43
44set GSDL3PATH=
45
46"%RUNJAVA%" -cp "%CLASSPATH%" %opt_properties% org.greenstone.server.Server3 "%GSDL3SRCHOME%"
47
48
49
50
51
Note: See TracBrowser for help on using the repository browser.