diff options
-rwxr-xr-x | trunk/src/jail-commit | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/trunk/src/jail-commit b/trunk/src/jail-commit index 76e326b..d338e75 100755 --- a/trunk/src/jail-commit +++ b/trunk/src/jail-commit @@ -69,9 +69,15 @@ function template_merge { function template_svn_commit { - if use_svn; then - cd `dirname $TEMPLATE_BASE` + # issue a svn_commit from a template folder + # usage: template_svn_commit <template-folder> + + if use_svn && [ -d "$1/.svn" ]; then + cd $1 svn commit -m "changes for `date`" + if [ "$?" != "0" ]; then + echo $BASENAME: commit error + fi fi } @@ -95,14 +101,14 @@ function do_commit { search_template $template --update if [ "$?" == "0" ]; then if [ "$jailpath" == "/" ]; then - echo updating main installation... + echo Updating main installation... else - echo updating $jailpath... + echo Updating $jailpath... fi if [ -d "$TEMPLATE_BASE.d" ] || [ -a "$TEMPLATE_BASE.template" ]; then templatepkg -u $template $jailpath template_merge $jailpath - template_svn_commit $TEMPLATE_BASE + template_svn_commit `dirname $TEMPLATE_BASE` fi fi |