Skip to content

Instantly share code, notes, and snippets.

@alibitek
Created March 18, 2014 17:01
Show Gist options
  • Save alibitek/9624399 to your computer and use it in GitHub Desktop.
Save alibitek/9624399 to your computer and use it in GitHub Desktop.
Update SVN repository recursive
#!/usr/bin/env bash
function 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment