aboutsummaryrefslogtreecommitdiff
path: root/trunk/lib
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-12-01 16:00:17 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-12-01 16:00:17 +0000
commit3b9534f7d814091a40c91f4823bd3c6f9696fefc (patch)
treed5db0957b594dd0303cd8dd5f48f371e8dac6082 /trunk/lib
parent89d8e101ac029f127a2579c531052e42d2ebd33b (diff)
downloadsimplepkg-3b9534f7d814091a40c91f4823bd3c6f9696fefc.tar.gz
simplepkg-3b9534f7d814091a40c91f4823bd3c6f9696fefc.tar.bz2
adding mkbuild commit features
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@616 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/lib')
-rw-r--r--trunk/lib/common.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh
index 15bad2f..f1635e4 100644
--- a/trunk/lib/common.sh
+++ b/trunk/lib/common.sh
@@ -700,6 +700,33 @@ function svn_remove_empty_folders {
}
+function commit_changes {
+
+ # usage: commit_changes <path>
+
+ local repos="$1" tmpfile
+ shift
+
+ if [ -d "$repos/.svn" ]; then
+ cwd="`pwd`"
+ chown_svn $repos && chgrp_svn $repos
+ cd $repos
+ if [ ! -z "$1" ]; then
+ if tmpfile=`mktemp -t simplepkg_commit.XXXXXX`; then
+ echo $* > $tmpfile
+ su_svn commit -F $tmpfile
+ rm -f $tmpfile
+ else
+ su_svn commit
+ fi
+ else
+ su_svn commit
+ fi
+ cd $cwd
+ fi
+
+}
+
# -----------------------------------------------
# update jail functions
# -----------------------------------------------