diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-18 13:41:18 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-18 13:41:18 +0000 |
commit | d29bd832745a24bca9b330c342b5a3492d231ad7 (patch) | |
tree | e15f0f42b958ade005ff7f369a09acc4f8369d09 /trunk/lib | |
parent | f0e2e6ed6ccace548ceda5f82d31d841d11e6a67 (diff) | |
download | simplepkg-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.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 # ----------------------------------------------- |