From 4344d6008332e89bf08f55fdd4304abb6a974278 Mon Sep 17 00:00:00 2001 From: belliash Date: Sun, 8 Jan 2012 18:55:12 +0100 Subject: [PATCH] implement checkoutSubversion() --- libraries/repositories | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/libraries/repositories b/libraries/repositories index b107a05..3a8add2 100644 --- a/libraries/repositories +++ b/libraries/repositories @@ -17,3 +17,20 @@ function checkoutRsync() { --exclude=/packages ${ADDRESS} ${DIRECTORY}" || return 1 return 0 } + +#------------------------------------------------------------------------------- +# Downloads or updates specified SVN repository +# Parameters: %dest_directory% %address% +#------------------------------------------------------------------------------- +function checkoutSubversion() { + local DIRECTORY="${1}" + local ADDRESS="${2}" + if [ -d ${DIRECTORY} ]; then + cd ${DIRECTORY} + run "svn cleanup" || return 1 + run "svn update" || return 1 + else + run "svn checkout ${ADDRESS} ${DIRECTORY}" || return 1 + fi + return 0 +}