source: gs3-extensions/mat/trunk/bin/script/mat-colbuild-download.bat@ 22042

Last change on this file since 22042 was 22042, checked in by ak19, 14 years ago

Upgraded the technology used in mat-colbuild.bat and mat-colbuild-download.bat and also tidied up these files

  • Property svn:executable set to *
File size: 1.4 KB
Line 
1:: $1 should be the collection name
2:: $2 should be the oai URL
3:: $3 should be the cache directory
4:: $4 should be the max records
5:: $5 should be the OAI metadata prefix
6:: $6 should be GS3 root
7:: $7 should be the collection directory
8:: $8 should be the log file
9:: %9 should be the creator
10:: %10 should be the proxy settings
11
12SET COL_NAME=%1
13SET OAI_URL=%2
14SET CACHE_DIR=%3
15SET MAX_RECORDS=%4
16SET OAI_PREFIX=%5
17SET GS3_ROOT=%6
18SET COL_DIR=%7
19SET LOG_FILE=%8
20SET CREATOR=%9
21::SHIFT
22::SET PROXY=%9
23
24DEL %LOG_FILE%
25cd %GS3_ROOT%
26CALL gs3-setup.bat
27
28cd gs2build/
29CALL setup.bat
30
31cd bin/script/
32
33perl -S mkcol.pl -gs3mode -buildtype lucene -collectdir %COL_DIR% %COL_NAME%
34
35:: need to ensure that OAIPLUG is included
36:: hack the model collection to inclde it
37echo %COL_NAME% %OAI_URL% %CACHE_DIR% %MAX_RECORDS% %OAI_PREFIX% %GS3_ROOT% %COL_DIR% %LOG_FILE% >> %LOG_FILE%
38
39if not exist %CACHE_DIR% goto else
40RMDIR /S /Q %CACHE_DIR%
41goto endif
42:else
43md %CACHE_DIR%
44:endif
45
46echo "Away to download OAI" >> %LOG_FILE%
47
48echo %CREATOR%
49
50SET _CREATOR=%CREATOR%
51
52SET _CREATOR=###%_CREATOR%###
53SET _CREATOR=%_CREATOR:"###=%
54SET _CREATOR=%_CREATOR:###"=%
55SET _CREATOR=%_CREATOR:###=%
56
57echo "Away to run downloadfrom.pl with %_CREATOR%"
58
59perl downloadfrom.pl -download_mode OAI -cache_dir %CACHE_DIR% -url %OAI_URL% -max_records %MAX_RECORDS% -metadata_prefix %OAI_PREFIX% %_CREATOR%
60
61exit
Note: See TracBrowser for help on using the repository browser.