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
}
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