2 # Check out or update a SVN repository
9 SVNV
=`svn --version --quiet`
12 echo "You don't have SVN installed."
16 # Simple case - the repository doesn't exist
18 if [ ! -d $DIR/svn
/.svn
]; then
19 echo "Fetching $URL..."
20 svn co
-r $REV $URL $DIR/svn
22 echo "Couldn't fetch the code from $URL"
26 CURREV
=`svn info $DIR/svn | grep "Last Changed Rev" | awk '{ print $4 }'`
28 if [ $CURREV -ne $REV ]; then
30 echo "Updating from $CURREV to $REV"
31 svn update
-r $REV ||
{
32 echo "Couldn't update the repository."
38 tar -C $DIR -zcf $TARBALL svn