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 |
|
---|
12 | SET COL_NAME=%1
|
---|
13 | SET OAI_URL=%2
|
---|
14 | SET CACHE_DIR=%3
|
---|
15 | SET MAX_RECORDS=%4
|
---|
16 | SET OAI_PREFIX=%5
|
---|
17 | SET GS3_ROOT=%6
|
---|
18 | SET COL_DIR=%7
|
---|
19 | SET LOG_FILE=%8
|
---|
20 | SET CREATOR=%9
|
---|
21 | ::SHIFT
|
---|
22 | ::SET PROXY=%9
|
---|
23 |
|
---|
24 | DEL %LOG_FILE%
|
---|
25 | cd %GS3_ROOT%
|
---|
26 | CALL gs3-setup.bat
|
---|
27 |
|
---|
28 | cd gs2build/
|
---|
29 | CALL setup.bat
|
---|
30 |
|
---|
31 | cd bin/script/
|
---|
32 |
|
---|
33 | perl -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
|
---|
37 | echo %COL_NAME% %OAI_URL% %CACHE_DIR% %MAX_RECORDS% %OAI_PREFIX% %GS3_ROOT% %COL_DIR% %LOG_FILE% >> %LOG_FILE%
|
---|
38 |
|
---|
39 | if not exist %CACHE_DIR% goto else
|
---|
40 | RMDIR /S /Q %CACHE_DIR%
|
---|
41 | goto endif
|
---|
42 | :else
|
---|
43 | md %CACHE_DIR%
|
---|
44 | :endif
|
---|
45 |
|
---|
46 | echo "Away to download OAI" >> %LOG_FILE%
|
---|
47 |
|
---|
48 | echo %CREATOR%
|
---|
49 |
|
---|
50 | SET _CREATOR=%CREATOR%
|
---|
51 |
|
---|
52 | SET _CREATOR=###%_CREATOR%###
|
---|
53 | SET _CREATOR=%_CREATOR:"###=%
|
---|
54 | SET _CREATOR=%_CREATOR:###"=%
|
---|
55 | SET _CREATOR=%_CREATOR:###=%
|
---|
56 |
|
---|
57 | echo "Away to run downloadfrom.pl with %_CREATOR%"
|
---|
58 |
|
---|
59 | perl downloadfrom.pl -download_mode OAI -cache_dir %CACHE_DIR% -url %OAI_URL% -max_records %MAX_RECORDS% -metadata_prefix %OAI_PREFIX% %_CREATOR%
|
---|
60 |
|
---|
61 | exit |
---|
Note:
See
TracBrowser
for help on using the repository browser.