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 | |
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')
-rw-r--r-- | trunk/doc/CHANGELOG | 4 | ||||
-rw-r--r-- | trunk/lib/common.sh | 19 | ||||
-rw-r--r-- | trunk/src/createpkg | 4 | ||||
-rwxr-xr-x | trunk/src/mkbuild | 20 |
4 files changed, 26 insertions, 21 deletions
diff --git a/trunk/doc/CHANGELOG b/trunk/doc/CHANGELOG index 657ae79..5f02b04 100644 --- a/trunk/doc/CHANGELOG +++ b/trunk/doc/CHANGELOG @@ -20,7 +20,9 @@ simplepkg changelog - repos.conf and simplepkg.conf: - default configuration making createpkg repository integrated with simplaret - new repositories - - mkbuild: some svn check routines extended for git + - mkbuild: + - function svn_mkdir moved to common.sh + - some svn check routines extended for git - perl.mkSlackBuild - added sections copy_init_scripts and copy_config_files - generic.mkSlackBuild and per.mkSlackBuild 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 # ----------------------------------------------- diff --git a/trunk/src/createpkg b/trunk/src/createpkg index fe52d4f..1ab48a6 100644 --- a/trunk/src/createpkg +++ b/trunk/src/createpkg @@ -526,12 +526,12 @@ PKG_NAME="`ls -1 -c $MAKEPKG_REPOS/$PACKAGE-*-*-*.tgz | head -n 1 | xargs basena # Create repository directory if [ ! -e $NEW_REPOS ]; then - mkdir -p $NEW_REPOS || mkdir -p $NEW_REPOS + mkdir -p $NEW_REPOS if [ -d "$MAKEPKG_REPOS/.svn" ] && ! svn_check $NEW_REPOS; then cwd="`pwd`" cd $MAKEPKG_REPOS chown_svn $MAKEPKG_REPOS && chgrp_svn $MAKEPKG_REPOS - su_svn add $( echo ${SCRIPT_BASE#$SLACKBUILDS_DIR/} ) + svn_mkdir $( echo ${SCRIPT_BASE#$SLACKBUILDS_DIR/} ) cd $cwd fi fi diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild index efc3adc..98d7b5c 100755 --- a/trunk/src/mkbuild +++ b/trunk/src/mkbuild @@ -603,23 +603,7 @@ function commit_mkbuild { } -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} - fi - done - -} - +# TODO: merge with svn_add function from common.sh function svn_add { # svn add file @@ -627,7 +611,7 @@ function svn_add { # copy file if [ -e $2/$1 ]; then - echo "$2/$1 exist. Overwriter it." + echo "$2/$1 exists. Overwrite it." cp $WORK/$1 $2/ else cp $WORK/$1 $2/ |