1#/bin/bash
2
3CVSOPTS="-Q";
4
5cd ${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
8dir="";
9if [ $# -gt 0 ]; then 
10  while [ $# -gt 0 ]; do
11    dir=$dir" $1"; shift 1;
12  done
13else 
14  dir="$(ls -d cvssrc/*)"; 
15fi
16
17for 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.";
27done
28