diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-11-27 23:11:47 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-11-27 23:11:47 +0000 |
commit | cef62564549aaaded4e3135bffc181aa57c3151d (patch) | |
tree | 600fefbb7bf598f6c01392c02c5b4d0cbb5bfc33 /trunk/lib/common.sh | |
parent | 316be7696a4d1112328a346e49b50f1cb0c6290b (diff) | |
download | simplepkg-cef62564549aaaded4e3135bffc181aa57c3151d.tar.gz simplepkg-cef62564549aaaded4e3135bffc181aa57c3151d.tar.bz2 |
fixes
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@562 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/lib/common.sh')
-rw-r--r-- | trunk/lib/common.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index 21cf9be..93f1e0a 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -580,6 +580,25 @@ function svn_add { } +function svn_mkdir { + + # svn make directory + [ $# -ne 1 ] && handle_error $ERROR_PAR_NUMBER + + DIR_LIST=`echo $1 | tr '/' ' '` + + DIR="" + for i in $DIR_LIST; do + DIR=$DIR/$i + if [ ! -e ${DIR:1} ]; then + su_svn mkdir ${DIR:1} + elif [ -d "${DIR:1}" ] && [ ! -d "${DIR:1}/.svn" ]; then + su_svn add ${DIR:1} + fi + done + +} + # ----------------------------------------------- # update jail functions # ----------------------------------------------- |