diff options
Diffstat (limited to 'trunk/lib')
-rw-r--r-- | trunk/lib/common.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index 26c550f..c4224c8 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -799,6 +799,27 @@ function commit_changes { } +function check_svn_repo { + + # check a svn repository URL + # usage: set_svn_repo <repository> + + if [ ! -z "$1" ]; then + if echo $1 | grep -q -v -e "^svn://"; then + if echo $1 | grep -q -v -e "svn+.\+://"; then + if echo $1 | grep -q -v -e "^file://"; then + echo $BASENAME: invalid repository URL $1 + return 1 + fi + fi + fi + else + echo $BASENAME: no repository defined + return 1 + fi + +} + # ----------------------------------------------- # update jail functions # ----------------------------------------------- |