1 | @echo off
|
---|
2 |
|
---|
3 | :: ---- Check that %GSDL3HOME% is set ----
|
---|
4 | if not "%GSDL3HOME%" == "" goto start
|
---|
5 | echo You need to run gs3-setup.bat before running this file
|
---|
6 | goto exit
|
---|
7 |
|
---|
8 | :start
|
---|
9 | cd %GSDL3HOME%\comms\jakarta\tomcat\conf
|
---|
10 | ren server.xml server.xml.in
|
---|
11 | "%GSDL3HOME%\winutil\sed.exe" 's,port="8080",port="@portnum@",' server.xml.in >server.xml
|
---|
12 |
|
---|
13 | cd %GSDL3HOME%\web\WEB-INF
|
---|
14 | ren web.xml.in web.xml
|
---|
15 |
|
---|
16 | cd %GSDL3HOME%\web\sites
|
---|
17 | cd localsite
|
---|
18 | "%GSDL3HOME%\winutil\sed.exe" 's,localhost,@computername@,g' siteConfig.xml >siteConfig.xml.tmp
|
---|
19 | "%GSDL3HOME%\winutil\sed.exe" 's,8080,@portnum@,g' siteConfig.xml.tmp >siteConfig.xml
|
---|
20 | del siteConfig.xml.tmp
|
---|
21 | cd ..
|
---|
22 |
|
---|
23 | cd soapsite
|
---|
24 | "%GSDL3HOME%\winutil\sed.exe" 's,localhost,@computername@,g' siteConfig.xml >siteConfig.xml.tmp
|
---|
25 | "%GSDL3HOME%\winutil\sed.exe" 's,8080,@portnum@,g' siteConfig.xml.tmp >siteConfig.xml
|
---|
26 | del siteConfig.xml.tmp
|
---|
27 | cd ..
|
---|
28 |
|
---|
29 | cd %GSDL3HOME%
|
---|
30 | "%GSDL3HOME%\winutil\sed.exe" 's,localhost,@computername@,g' gs3-launch.bat >gs3-launch.bat.tmp
|
---|
31 | "%GSDL3HOME%\winutil\sed.exe" 's,8080,@portnum@,g' gs3-launch.bat.tmp >gs3-launch.bat
|
---|
32 | del gs3-launch.bat.tmp
|
---|
33 |
|
---|
34 | call make.bat clean
|
---|
35 | del lib\java\gate.jar >nul 2>&1
|
---|
36 | del src\java\org\greenstone\gsdl3\service\GATEServices.java >nul 2>&1
|
---|
37 |
|
---|
38 | cd %GSDL3HOME%\web\sites\localsite
|
---|
39 | ren collect collect.tmp
|
---|
40 | mkdir collect
|
---|
41 | move collect.tmp\chinesedemo collect
|
---|
42 | move collect.tmp\demo collect
|
---|
43 | move collect.tmp\gberg collect
|
---|
44 | move collect.tmp\infomine collect
|
---|
45 | move collect.tmp\mgppdemo collect
|
---|
46 | rmdir /S /Q collect.tmp
|
---|
47 |
|
---|
48 | cd %GSDL3HOME%
|
---|
49 | dir /B /S | find "\CVS" | find /V "\CVS\" | "%GSDL3HOME%\winutil\sed.exe" 's,^\(.\),@rmdir /S /Q \1,' >delcvs.bat
|
---|
50 | call delcvs.bat
|
---|
51 | del delcvs.bat
|
---|
52 |
|
---|
53 | cd %GSDL3HOME%
|
---|
54 | mkdir tmp
|
---|
55 | copy README.txt tmp
|
---|
56 | copy LICENSE.txt tmp
|
---|
57 | copy gs3-setup.bat tmp
|
---|
58 | copy gs3-launch.bat tmp
|
---|
59 | attrib +R gs3-for-distribution.bat
|
---|
60 | del /Q *.* >nul 2>&1
|
---|
61 | attrib -R gs3-for-distribution.bat
|
---|
62 | move tmp\*.* .
|
---|
63 | rmdir tmp
|
---|
64 |
|
---|
65 | :exit
|
---|