Created
March 18, 2014 17:01
-
-
Save alibitek/9624399 to your computer and use it in GitHub Desktop.
Update SVN repository recursive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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