From 81f1988b5f820f3ff0af56484d7279da03027f79 Mon Sep 17 00:00:00 2001 From: rhatto Date: Wed, 4 Apr 2007 20:21:00 +0000 Subject: jail-commit: minor fixes git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@236 04377dda-e619-0410-9926-eae83683ac58 --- trunk/src/jail-commit | 16 +++++++++++----- 1 file 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 + + 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 -- cgit v1.2.3