:: %1 should be the collection name :: %2 should be the cache directory :: %3 should be GS3 root :: %4 should be the collection directory :: %5 should be the log file :: %6 should be the hostname:port SET COL_NAME=%1 SET CACHE_DIR=%2 SET GS3_ROOT=%3 SET COL_DIR=%4 SET LOG_FILE=%5 SET HOST_PORT=%6 :: check we are still in the right directories cd %GS3_ROOT% CALL gs3-setup.bat cd gs2build/ CALL setup.bat cd bin/script/ echo "Away to build" XCOPY %CACHE_DIR%\* %COL_DIR%\%COL_NAME%\import /s /i /y perl -S incremental-rebuild.pl -site localsite -collectdir %COL_DIR% %COL_NAME% echo "Build finished ...." :: echo %6/gs2build/collect/%1 :: if not exist %6/gs2build/collect/%1 goto else :: echo "moving from gs2 dir" :: echo built in gs2 dir ... moving :: goto endif :: :else :: move %6/gs2build/collect/%1 %7/%1 :: :endif echo "Away to convert from Greenstone 2 to Greenstone 3" >> %LOG_FILE% echo "Away to convert from Greenstone 2 to Greenstone 3" cd %GS3_ROOT% cd bin/script/ ::perl convert_coll_from_gs2.pl -collectdir %7 %1 echo "Away to reconfigure Greenstone 3 server" >> %LOG_FILE% echo "Away to reconfigure Greenstone 3 server" :: wget -O /tmp/mat5.html "http://localhost:8090/greenstone3/library?a=s&sa=c" wget -O %CACHE_DIR%/mat-reconfigure.html "http://%HOST_PORT%/greenstone3/library?a=s&sa=c" echo "Done" >> %LOG_FILE% echo "Done" exit