1 | @echo off
|
---|
2 |
|
---|
3 | :: ---- Check that %GSDL3HOME% is set ----
|
---|
4 | if not "%GSDL3HOME%" == "" goto start
|
---|
5 | echo You need to run setup.bat before running this install file
|
---|
6 | goto exit
|
---|
7 |
|
---|
8 | :start
|
---|
9 | :: ---- Make sure we have the current GSDL3 (also prunes empty directories) ----
|
---|
10 | cvs update -dRP
|
---|
11 |
|
---|
12 | :: ---- Check out mgpp ----
|
---|
13 | cd %GSDL3HOME%\packages
|
---|
14 | cvs co mgpp
|
---|
15 |
|
---|
16 | :: ---- Unpack Tomcat and rename folder ----
|
---|
17 | echo Unpacking Tomcat...
|
---|
18 | cd %GSDL3HOME%\comms\jakarta
|
---|
19 | "%GSDL3HOME%\winutil\gunzip.exe" tomcat-4.1.24.tar.gz
|
---|
20 | "%GSDL3HOME%\winutil\tar.exe" xf tomcat-4.1.24.tar
|
---|
21 | ren jakarta-tomcat-4.1.24 tomcat
|
---|
22 |
|
---|
23 | :: ---- Edit the Tomcat setclasspath script to add our classpath ----
|
---|
24 | echo Fixing setclasspath.bat...
|
---|
25 | cd %GSDL3HOME%\comms\jakarta\tomcat\bin
|
---|
26 | ren setclasspath.bat setclasspath.bat.orig
|
---|
27 | "%GSDL3HOME%\winutil\sed.exe" 's,set CLASSPATH=,set CLASSPATH=%%CLASSPATH%%;,' setclasspath.bat.orig > setclasspath.bat
|
---|
28 |
|
---|
29 | :: ---- Unpack the sample collections ----
|
---|
30 | echo Unpacking sample collections...
|
---|
31 | cd %GSDL3HOME%\web\sites\localsite\collect
|
---|
32 |
|
---|
33 | cd chinesedemo\index
|
---|
34 | "%GSDL3HOME%\winutil\gunzip.exe" indexfiles.tgz
|
---|
35 | "%GSDL3HOME%\winutil\tar.exe" xf indexfiles.tar
|
---|
36 | del indexfiles.tar
|
---|
37 | cd ..\..
|
---|
38 |
|
---|
39 | cd demo\index
|
---|
40 | "%GSDL3HOME%\winutil\gunzip.exe" indexfiles.tgz
|
---|
41 | "%GSDL3HOME%\winutil\tar.exe" xf indexfiles.tar
|
---|
42 | del indexfiles.tar
|
---|
43 | cd ..\..
|
---|
44 |
|
---|
45 | cd gberg\index
|
---|
46 | "%GSDL3HOME%\winutil\gunzip.exe" indexfiles.tgz
|
---|
47 | "%GSDL3HOME%\winutil\tar.exe" xf indexfiles.tar
|
---|
48 | del indexfiles.tar
|
---|
49 | cd ..\..
|
---|
50 |
|
---|
51 | cd mgppdemo\index
|
---|
52 | "%GSDL3HOME%\winutil\gunzip.exe" indexfiles.tgz
|
---|
53 | "%GSDL3HOME%\winutil\tar.exe" xf indexfiles.tar
|
---|
54 | del indexfiles.tar
|
---|
55 | cd ..\..
|
---|
56 |
|
---|
57 | :: ---- Enter the correct paths in various files ----
|
---|
58 | if "%1" == "-for_distribution" goto done
|
---|
59 |
|
---|
60 | :: ---- Set up the servlet information for Tomcat ----
|
---|
61 | echo Setting up servlet information for Tomcat...
|
---|
62 | cd %GSDL3HOME%\web\WEB-INF
|
---|
63 | echo %GSDL3HOME%| "%GSDL3HOME%\winutil\sed.exe" 's,\\,\\\\,g' | "%GSDL3HOME%\winutil\setvar.exe" GSDL3HOME_ESCAPED >setgsdl3e.bat
|
---|
64 | call setgsdl3e.bat
|
---|
65 | del setgsdl3e.bat
|
---|
66 | "%GSDL3HOME%\winutil\sed.exe" 's,@gsdl3home@,%GSDL3HOME_ESCAPED%,' web.xml.in > web.xml
|
---|
67 | set GSDL3HOME_ESCAPED=
|
---|
68 |
|
---|
69 | :done
|
---|
70 | cd %GSDL3HOME%
|
---|
71 |
|
---|
72 | :exit
|
---|