@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 if not "%1" == "" goto start2 echo Usage: gs3-build sitename collname goto exit :start2 if not "%2" == "" goto run echo Usage: gs3-build sitename collname goto exit :run :: first we need to drop the database if it exists echo trying to drop the database %GSDL3HOME%\packages\mysql\bin\mysql --user=root --execute="drop database %1_%2;" java -cp %CLASSPATH% -DGSDL3HOME=%GSDL3HOME% -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser org.greenstone.gsdl3.gs3build.Build -site %1 -collect %2 :exit