diff options
Diffstat (limited to 'trunk/lib')
-rw-r--r-- | trunk/lib/common.sh | 27 |
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 # ----------------------------------------------- |