Changeset 22041 for gs3-extensions/mat
- Timestamp:
- 2010-05-05T17:33:46+12:00 (14 years ago)
- Location:
- gs3-extensions/mat/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/mat/trunk/bin/script/mat-colbuild-download.bash
r22002 r22041 13 13 # $9 should be the creator 14 14 # $10 should be the proxy settings 15 16 COL_NAME=$1 17 OAI_URL=$2 18 CACHE_DIR=$3 19 MAX_RECORDS=$4 20 OAI_PREF=$5 15 21 GS3_ROOT=$6 16 22 COLLECT_DIR=$7 17 23 LOG_FILE=$8 18 CACHE_DIR=$3 24 CREATOR=$9 25 #SHIFT 26 #PROXY=$9 19 27 20 28 if [ -x /usr/bin/lsof ] ; then … … 28 36 fi 29 37 30 TOMCAT_ID=`ps ux | grep tomcat | grep java | grep -v grep | awk -F" " '{ print $ 2}'`38 TOMCAT_ID=`ps ux | grep tomcat | grep java | grep -v grep | awk -F" " '{ print $OAI_URL }'` 31 39 32 40 if [ ! -z "$lsof" ] ; then … … 44 52 source setup.bash >> $LOG_FILE 45 53 46 perl -S mkcol.pl -gs3mode - collectdir $COLLECT_DIR $154 perl -S mkcol.pl -gs3mode -buildtype lucene -collectdir $COLLECT_DIR $COL_NAME 47 55 48 echo $ 1 $2 $3 $4 $5 $6 $7 $8>> $LOG_FILE56 echo $COL_NAME $OAI_URL $CACHE_DIR $MAX_RECORDS $OAI_PREF $GS3_ROOT $COLLECT_DIR $LOG_FILE >> $LOG_FILE 49 57 50 58 if [ ! -z "$lsof" ] ; then … … 67 75 fi 68 76 69 perl -S downloadfrom.pl -download_mode OAI -cache_dir $CACHE_DIR -url $ 2 -max_records $4 -metadata_prefix $5 $92>&1 >> $LOG_FILE77 perl -S downloadfrom.pl -download_mode OAI -cache_dir $CACHE_DIR -url $OAI_URL -max_records $MAX_RECORDS -metadata_prefix $OAI_PREF $CREATOR 2>&1 >> $LOG_FILE 70 78 71 79 if [ ! -z "$lsof" ] ; then -
gs3-extensions/mat/trunk/bin/script/mat-colbuild.bash
r21996 r22041 5 5 # $2 should be the oai URL 6 6 # $3 should the cache directory 7 # $4 should be the max records 8 # $5 should be the OAI metadata prefix 9 # $6 should be GS3 root 10 # $7 should be the collection directory 11 # $8 should the log file 12 # $9 should be the host name : port number 7 # $4 should be GS3 root 8 # $5 should be the collection directory 9 # $6 should the log file 10 # $7 should be the host name : port number 13 11 14 #$GS3_ROOT=$6 15 #$COLLECT_DIR=$7 16 #$LOG_FILE=$8 12 COL_NAME=$1 13 OAI_URL=$2 17 14 CACHE_DIR=$3 15 GS3_ROOT=$4 16 COL_DIR=$5 17 LOG_FILE=$6 18 HOST_PORT=$7 18 19 19 20 # check we are still in the right directories … … 29 30 fi 30 31 31 TOMCAT_ID=`ps ux | grep tomcat | grep java | grep -v grep | awk -F" " '{ print $ 2}'`32 TOMCAT_ID=`ps ux | grep tomcat | grep java | grep -v grep | awk -F" " '{ print $OAI_URL }'` 32 33 echo Tomcat_ID: $TOMCAT_ID 33 34 … … 37 38 fi 38 39 39 cd $ 640 source gs3-setup.sh >> $ 840 cd $GS3_ROOT 41 source gs3-setup.sh >> $LOG_FILE 41 42 42 43 cd gs2build/ 43 source setup.bash >> $8 44 44 source setup.bash >> $LOG_FILE 45 45 46 46 # event log goes to greenstone3/gs2build/etc/events.txt … … 48 48 ## build -indextype lucene -site localsite -collectdir $COLLECT_DIR -download file://$3 -log_events $1 49 49 50 echo "Away to build" >> $8 50 echo "Away to build" >> $LOG_FILE 51 #echo "BABAB CACHE_DIR = Q $CACHE_DIR Q - COL_DIR = Q $COL_DIR Q - COL_NAME = Q $COL_NAME Q" 52 #echo "AAAAA /bin/cp -r" $CACHE_DIR/* "$COL_DIR/$COL_NAME/import/." 53 /bin/cp -r $CACHE_DIR/* $COL_DIR/$COL_NAME/import/. 51 54 52 build -indextype lucene -site localsite -collectdir $7 -log_events -download file://$CACHE_DIR $1 2>&1 55 echo "perl -S incremental-rebuild.pl -site localsite -collectdir $COL_DIR $COL_NAME" 56 57 perl -S incremental-rebuild.pl -site localsite -collectdir $COL_DIR $COL_NAME 58 59 #build -indextype lucene -site localsite -collectdir $COL_DIR -log_events -download file://$CACHE_DIR $COL_NAME 2>&1 53 60 #2>&1 >> $LOG_FILE 54 61 … … 57 64 if [ ! -z "$lsof" ] ; then 58 65 NUM_OPEN_FILES=`$lsof -p $TOMCAT_ID | wc -l ` 59 echo open files: $NUM_OPEN_FILES66 echo Finished Build: open files: $NUM_OPEN_FILES 60 67 fi 61 68 62 echo "Build finished ...." >> $ 869 echo "Build finished ...." >> $LOG_FILE 63 70 64 if [ -d $ 6/gs2build/collect/$1]71 if [ -d $GS3_ROOT/gs2build/collect/$COL_NAME ] 65 72 then 66 echo "moving from gs2 dir" >> $ 873 echo "moving from gs2 dir" >> $LOG_FILE 67 74 echo built in gs2 dir ... moving 68 mv $ 6/gs2build/collect/$1 $7/$175 mv $GS3_ROOT/gs2build/collect/$COL_NAME $COL_DIR/$COL_NAME 69 76 fi 70 77 71 echo "Away to convert from Greenstone 2 to Greenstone 3" >> $872 echo "Away to convert from Greenstone 2 to Greenstone 3"73 74 # >> $LOG_FILE75 78 76 79 if [ ! -z "$lsof" ] ; then … … 80 83 fi 81 84 82 echo "Away to reconfigure Greenstone 3 server" >> $ 885 echo "Away to reconfigure Greenstone 3 server" >> $LOG_FILE 83 86 echo "Away to reconfigure Greenstone 3 server" 84 87 … … 86 89 87 90 #wget -O /tmp/mat5.html "http://localhost:8090/greenstone3/library?a=s&sa=c" 88 wget -O /tmp/mat3.html "http://$ 9/greenstone3/library?a=s&sa=c"91 wget -O /tmp/mat3.html "http://$HOST_PORT/greenstone3/library?a=s&sa=c" 89 92 90 echo "Done" >> $ 893 echo "Done" >> $LOG_FILE 91 94 echo "Done" 92 95 -
gs3-extensions/mat/trunk/src/org/greenstone/mat/servlet/MatServlet.java
r22007 r22041 461 461 462 462 463 String[] arrays = new String[1 4];463 String[] arrays = new String[11]; 464 464 arrays[0] = "cmd"; 465 465 arrays[1] = "/c"; … … 468 468 arrays[4] = "mat-colbuild.bat"; 469 469 arrays[5] = collName; 470 arrays[6] = oaiURLString; 471 arrays[7] = cacheDir; 472 arrays[8] = "100"; 473 arrays[9] = oaiPrefix; 474 arrays[10] = gs3Root; 475 arrays[11] = collectDir; 476 arrays[12] = logFile; 477 arrays[13] = hostName + port_number; 470 arrays[6] = cacheDir; 471 arrays[7] = gs3Root; 472 arrays[8] = collectDir; 473 arrays[9] = logFile; 474 arrays[10] = hostName + ":" + port_number; 478 475 479 476 Process p2 = processBatch(arrays,out,wd); … … 623 620 + cacheDir 624 621 + " " 625 + maxRecords626 + " "627 + metadataprefix628 + " "629 622 + gs3Root 630 623 + " "
Note:
See TracChangeset
for help on using the changeset viewer.