Home | History | Annotate | Download | only in searchcvs
      1 #/bin/bash
      2 
      3 CVSOPTS="-Q";
      4 
      5 cd ${0%/*}; # cd to directory where this script is located; cvssrc/ must be beneath it
      6 
      7 # pass in specific target folder(s) or do all in cvssrc/ folder
      8 dir="";
      9 if [ $# -gt 0 ]; then 
     10   while [ $# -gt 0 ]; do
     11     dir=$dir" $1"; shift 1;
     12   done
     13 else 
     14   dir="$(ls -d cvssrc/*)"; 
     15 fi
     16 
     17 for i in $dir; do
     18   echo "[`date +%H:%M:%S`] Processing $i";
     19   cd $i;
     20   cvs $CVSOPTS up -Pd .;
     21   f=$(mktemp)
     22   cvs $CVSOPTS log > $f
     23   echo $f | /usr/local/bin/php ../../parsecvs.php;
     24   rm -f $f
     25   cd ../..;
     26   echo "[`date +%H:%M:%S`] done.";
     27 done
     28