09 July 2006

cvs update all subdirectories

assuming server1.domain.com:/cvs is the cvs repository and you have a whole bunch of cvs modules checked out in /cygdrive/c/sekhonp/it/builds/system1

#!/bin/bash
cvs=/cygdrive/c/sekhonp/tools/cvs/cvs

update()
{
 echo "Updating system ${1}"
 cd ${1}

 for module in *; do
   if [ -d ${module}/CVS ]; then
     ${cvs} -qq -d :pserver:`whoami`@server1.domain.com:/cvs update -dPA ${module}
   fi
 done
}

update /cygdrive/c/sekhonp/it/builds/system1

No comments: