diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-11-27 22:23:38 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-11-27 22:23:38 +0000 |
commit | 316be7696a4d1112328a346e49b50f1cb0c6290b (patch) | |
tree | 4d3fe9fb7e04ab3639a4abcb5566ce1a2e5b52a2 /trunk/src/createpkg | |
parent | 56d7b602a4209d74a2a1a7cd2d6ea2920e8c3690 (diff) | |
download | simplepkg-316be7696a4d1112328a346e49b50f1cb0c6290b.tar.gz simplepkg-316be7696a4d1112328a346e49b50f1cb0c6290b.tar.bz2 |
adding user and group support for svn management
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@561 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/src/createpkg')
-rw-r--r-- | trunk/src/createpkg | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/trunk/src/createpkg b/trunk/src/createpkg index e465e58..fe52d4f 100644 --- a/trunk/src/createpkg +++ b/trunk/src/createpkg @@ -257,6 +257,8 @@ function load_parameters { SOURCE_DIR="`eval_parameter SOURCE_DIR /var/simplepkg/sources`" SLACKBUILDS_DIR="`eval_parameter SLACKBUILDS_DIR /var/simplepkg/slackbuilds`" SLACKBUILDS_SVN="`eval_parameter SLACKBUILDS_SVN http://slack.sarava.org/slackbuilds`" + SVN_USER="`eval_parameter MAKEPKG_SVN_USER`" + SVN_GROUP="`eval_parameter MAKEPKG_SVN_GROUP`" COLOR_MODE="`eval_parameter COLOR_MODE none`" CREATE_ARCH="`eval_parameter CREATE_ARCH $(default_arch)`" @@ -272,7 +274,8 @@ function repository_update { if [ -d "$MAKEPKG_REPOS/.svn" ]; then cwd="`pwd`" - cd $MAKEPKG_REPOS && svn update + chown_svn $MAKEPKG_REPOS && chgrp_svn $MAKEPKG_REPOS + cd $MAKEPKG_REPOS && su_svn update cd $cwd fi @@ -284,7 +287,7 @@ function repository_status { if [ -d "$MAKEPKG_REPOS/.svn" ]; then cwd="`pwd`" - cd $MAKEPKG_REPOS && svn status + cd $MAKEPKG_REPOS && su_svn status cd $cwd fi @@ -296,11 +299,12 @@ function commit_changes { if [ -d "$MAKEPKG_REPOS/.svn" ]; then cwd="`pwd`" + chown_svn $MAKEPKG_REPOS && chgrp_svn $MAKEPKG_REPOS cd $MAKEPKG_REPOS if [ ! -z "$1" ]; then - svn commit -m $* + su_svn commit -m $* else - svn commit + su_svn commit fi cd $cwd fi @@ -526,7 +530,8 @@ if [ ! -e $NEW_REPOS ]; then if [ -d "$MAKEPKG_REPOS/.svn" ] && ! svn_check $NEW_REPOS; then cwd="`pwd`" cd $MAKEPKG_REPOS - svn add $( echo ${SCRIPT_BASE#$SLACKBUILDS_DIR/} ) + chown_svn $MAKEPKG_REPOS && chgrp_svn $MAKEPKG_REPOS + su_svn add $( echo ${SCRIPT_BASE#$SLACKBUILDS_DIR/} ) cd $cwd fi fi @@ -561,7 +566,8 @@ if [ $REMOVE_OLD_PACKAGE -eq $on ]; then if [ "`package_version $file`" != "$PACKAGE_VERSION" ] || \ [ "`package_arch $file`" != "$PACKAGE_ARCH" ] || \ [ "`package_build $file`" != "$PACKAGE_BUILD" ]; then - svn del --force $file + chown_svn $MAKEPKG_REPOS && chgrp_svn $MAKEPKG_REPOS + su_svn del --force $file fi else rm $file @@ -570,10 +576,11 @@ if [ $REMOVE_OLD_PACKAGE -eq $on ]; then for file in `find $MAKEPKG_REPOS -name "$PACKAGE.slack-required"`; do if svn_check $file; then + chown_svn $MAKEPKG_REPOS && chgrp_svn $MAKEPKG_REPOS if [ $MOVE_SLACK_REQUIRED -eq $off ]; then - svn del --force $file + su_svn del --force $file elif [ ! -z "$SLACK_REQUIRED" ] && [ "$NEW_REPOS/$PACKAGE.slack-required" != "$file" ]; then - svn del --force $file + su_svn del --force $file fi else rm $file @@ -596,7 +603,8 @@ if [ $MOVE_BIN_PACKAGE -eq $on ]; then if [ -d "$NEW_REPOS/.svn" ]; then cwd="`pwd`" cd $NEW_REPOS - svn add $PKG_NAME + chown_svn $MAKEPKG_REPOS && chgrp_svn $MAKEPKG_REPOS + su_svn add $PKG_NAME cd $cwd fi @@ -607,7 +615,8 @@ if [ $MOVE_BIN_PACKAGE -eq $on ]; then if [ -d "$NEW_REPOS/.svn" ] && ! svn_check $NEW_REPOS/$PACKAGE.slack-required; then cwd="`pwd`" cd $NEW_REPOS - svn add $PACKAGE.slack-required + chown_svn $MAKEPKG_REPOS && chgrp_svn $MAKEPKG_REPOS + su_svn add $PACKAGE.slack-required cd $cwd fi fi |