@echo off :: ---- Check that %GSDL3HOME% is set ---- if not "%GSDL3HOME%" == "" goto start echo You need to run gs3-setup.bat before running this file goto exit :start cd %GSDL3HOME%\comms\jakarta\tomcat\conf ren server.xml server.xml.in "%GSDL3HOME%\winutil\sed.exe" 's,port="8080",port="@portnum@",' server.xml.in >server.xml cd %GSDL3HOME%\web\WEB-INF ren web.xml.in web.xml cd %GSDL3HOME%\web\sites cd localsite "%GSDL3HOME%\winutil\sed.exe" 's,localhost,@computername@,g' siteConfig.xml >siteConfig.xml.tmp "%GSDL3HOME%\winutil\sed.exe" 's,8080,@portnum@,g' siteConfig.xml.tmp >siteConfig.xml del siteConfig.xml.tmp cd .. cd soapsite "%GSDL3HOME%\winutil\sed.exe" 's,localhost,@computername@,g' siteConfig.xml >siteConfig.xml.tmp "%GSDL3HOME%\winutil\sed.exe" 's,8080,@portnum@,g' siteConfig.xml.tmp >siteConfig.xml del siteConfig.xml.tmp cd .. cd %GSDL3HOME% "%GSDL3HOME%\winutil\sed.exe" 's,localhost,@computername@,g' gs3-launch.bat >gs3-launch.bat.tmp "%GSDL3HOME%\winutil\sed.exe" 's,8080,@portnum@,g' gs3-launch.bat.tmp >gs3-launch.bat del gs3-launch.bat.tmp call make.bat clean del lib\java\gate.jar >nul 2>&1 del src\java\org\greenstone\gsdl3\service\GATEServices.java >nul 2>&1 cd %GSDL3HOME%\web\sites\localsite ren collect collect.tmp mkdir collect move collect.tmp\chinesedemo collect move collect.tmp\demo collect move collect.tmp\gberg collect move collect.tmp\infomine collect move collect.tmp\mgppdemo collect rmdir /S /Q collect.tmp cd %GSDL3HOME% dir /B /S | find "\CVS" | find /V "\CVS\" | "%GSDL3HOME%\winutil\sed.exe" 's,^\(.\),@rmdir /S /Q \1,' >delcvs.bat call delcvs.bat del delcvs.bat cd %GSDL3HOME% mkdir tmp copy README.txt tmp copy LICENSE.txt tmp copy gs3-setup.bat tmp copy gs3-launch.bat tmp attrib +R gs3-for-distribution.bat del /Q *.* >nul 2>&1 attrib -R gs3-for-distribution.bat move tmp\*.* . rmdir tmp :exit