aboutsummaryrefslogtreecommitdiff
path: root/trunk/lib
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-12-18 13:41:18 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-12-18 13:41:18 +0000
commitd29bd832745a24bca9b330c342b5a3492d231ad7 (patch)
treee15f0f42b958ade005ff7f369a09acc4f8369d09 /trunk/lib
parentf0e2e6ed6ccace548ceda5f82d31d841d11e6a67 (diff)
downloadsimplepkg-d29bd832745a24bca9b330c342b5a3492d231ad7.tar.gz
simplepkg-d29bd832745a24bca9b330c342b5a3492d231ad7.tar.bz2
minor fixes
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@683 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/lib')
-rw-r--r--trunk/lib/common.sh21
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
# -----------------------------------------------