Changeset 22041 for gs3-extensions/mat/trunk/bin/script/mat-colbuild.bash
- Timestamp:
- 2010-05-05T17:33:46+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.