Updateall.sh

From Stack Overflow
Jump to: navigation, search

If you are sitting in a folder that contains a bunch of CVS projects (e.g. ~/Code/workspace, which contains a bunch of checked out CVS projects) and want to update them all in one go, here is a quick and useful command to do so:

#!/bin/sh
FOLDERS=`find . -type d -maxdepth 1`
set -e
for f in $FOLDERS ; do
    if [ -d $f/CVS ]; then
        echo "################################"
        echo "## $f"
        echo "################################"
        cd $f
        cvs -q update -d
        cd ..
    fi
done
Personal tools