Friday, June 24, 2011

Recursive Update issue in SVN

The Script below helps to resolve the problem...


#!/bin/bash

update ()
{
#echo "Call to update ($1)"
if [ -d $1/.svn ]
then
echo "Updating $1..."
svn up $1
else
# echo `ls`
for i in `ls $1`
do
if [ -d $1/$i ]
then
# echo "Descending to $i..."
update $1/$i
fi
done
fi
}

if [ "$1" == "" ]; then
echo "Updating all SVN projects in `pwd`..."
update .
else
echo "Updating all SVN projects in $1..."
update $1
fi

No comments:

Post a Comment