aboutsummaryrefslogtreecommitdiff
path: root/trunk/lib/common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/lib/common.sh')
-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
# -----------------------------------------------