@echo off :: ---- Check that %GSDL3HOME% is set ---- if not "%GSDL3HOME%" == "" goto start echo You need to run setup.bat before running this install file goto exit :start :: ---- Make sure we have the current GSDL3 (also prunes empty directories) ---- cvs update -dRP :: ---- Check out mgpp ---- cd %GSDL3HOME%\packages cvs co mgpp :: ---- Unpack Tomcat and rename folder ---- echo Unpacking Tomcat... cd %GSDL3HOME%\comms\jakarta "%GSDL3HOME%\winutil\gunzip.exe" tomcat-4.1.24.tar.gz "%GSDL3HOME%\winutil\tar.exe" xf tomcat-4.1.24.tar ren jakarta-tomcat-4.1.24 tomcat del tomcat-4.1.24.tar :: ---- Edit the Tomcat setclasspath script to add our classpath ---- echo Fixing setclasspath.bat... cd %GSDL3HOME%\comms\jakarta\tomcat\bin ren setclasspath.bat setclasspath.bat.orig "%GSDL3HOME%\winutil\sed.exe" 's,set CLASSPATH=,set CLASSPATH=%%CLASSPATH%%;,' setclasspath.bat.orig > setclasspath.bat :: ---- Unpack the sample collections ---- echo Unpacking sample collections... cd %GSDL3HOME%\web\sites\localsite\collect cd chinesedemo\index "%GSDL3HOME%\winutil\gunzip.exe" indexfiles.tgz "%GSDL3HOME%\winutil\tar.exe" xf indexfiles.tar del indexfiles.tar cd ..\.. cd demo\index "%GSDL3HOME%\winutil\gunzip.exe" indexfiles.tgz "%GSDL3HOME%\winutil\tar.exe" xf indexfiles.tar del indexfiles.tar cd ..\.. cd gberg\index "%GSDL3HOME%\winutil\gunzip.exe" indexfiles.tgz "%GSDL3HOME%\winutil\tar.exe" xf indexfiles.tar del indexfiles.tar cd ..\.. cd mgppdemo\index "%GSDL3HOME%\winutil\gunzip.exe" indexfiles.tgz "%GSDL3HOME%\winutil\tar.exe" xf indexfiles.tar del indexfiles.tar cd ..\.. :: ---- Enter the correct paths in various files ---- if "%1" == "-for_distribution" goto done :: ---- Set up the servlet information for Tomcat ---- echo Setting up servlet information for Tomcat... cd %GSDL3HOME%\web\WEB-INF echo %GSDL3HOME%| "%GSDL3HOME%\winutil\sed.exe" 's,\\,\\\\,g' | "%GSDL3HOME%\winutil\setvar.exe" GSDL3HOME_ESCAPED >setgsdl3e.bat call setgsdl3e.bat del setgsdl3e.bat "%GSDL3HOME%\winutil\sed.exe" 's,@gsdl3home@,%GSDL3HOME_ESCAPED%,' web.xml.in > web.xml set GSDL3HOME_ESCAPED= :done cd %GSDL3HOME% :exit