Show
Ignore:
Timestamp:
06.05.2010 10:24:22 (10 years ago)
Author:
ak19
Message:

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

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs3-extensions/mat/trunk/bin/script/mat-colbuild-download.bat

    r18213 r22042  
    99:: %9 should be the creator 
    1010:: %10 should be the proxy settings 
    11   
    12 DEL %8 
    13 cd %6 
     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% 
    1426CALL gs3-setup.bat 
    1527 
     
    1931cd bin/script/ 
    2032 
    21 perl -S mkcol.pl -gs3mode -collectdir %7 %1 
     33perl -S mkcol.pl -gs3mode -buildtype lucene -collectdir %COL_DIR% %COL_NAME% 
    2234 
    2335:: need to ensure that OAIPLUG is included 
    2436:: hack the model collection to inclde it 
    25 echo %1 %2 %3 %4 %5 %6 %7 %8 >> %8 
     37echo %COL_NAME% %OAI_URL% %CACHE_DIR% %MAX_RECORDS% %OAI_PREFIX% %GS3_ROOT% %COL_DIR% %LOG_FILE% >> %LOG_FILE% 
    2638 
    27 if not exist %3 goto else 
    28 RMDIR /S /Q  %3 
     39if not exist %CACHE_DIR% goto else 
     40RMDIR /S /Q  %CACHE_DIR% 
    2941goto endif 
    3042:else  
    31 md %3 
     43md %CACHE_DIR% 
    3244:endif 
    3345 
    34 echo "Away to download OAI" >> %8 
     46echo "Away to download OAI" >> %LOG_FILE% 
    3547 
    36 echo %9 
     48echo %CREATOR% 
    3749 
    38 SET _MyVariable=%9 
     50SET _CREATOR=%CREATOR% 
    3951 
    40 SET _MyVariable=###%_MyVariable%### 
    41 SET _MyVariable=%_MyVariable:"###=% 
    42 SET _MyVariable=%_MyVariable:###"=% 
    43 SET _MyVariable=%_MyVariable:###=% 
     52SET _CREATOR=###%_CREATOR%### 
     53SET _CREATOR=%_CREATOR:"###=% 
     54SET _CREATOR=%_CREATOR:###"=% 
     55SET _CREATOR=%_CREATOR:###=% 
     56 
     57echo "Away to run downloadfrom.pl with %_CREATOR%" 
    4458   
    45 perl downloadfrom.pl -download_mode OAI -cache_dir %3 -url %2 -max_records %4 -metadata_prefix %5 %_MyVariable% 
     59perl downloadfrom.pl -download_mode OAI -cache_dir %CACHE_DIR% -url %OAI_URL% -max_records %MAX_RECORDS% -metadata_prefix %OAI_PREFIX% %_CREATOR% 
    4660 
    4761exit