From 857c396e3a1ba281db89fccf23cde5b12a2766c2 Mon Sep 17 00:00:00 2001 From: rhatto Date: Thu, 5 Apr 2007 21:06:24 +0000 Subject: templatepkg: small fixes git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@260 04377dda-e619-0410-9926-eae83683ac58 --- trunk/src/templatepkg | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'trunk/src/templatepkg') diff --git a/trunk/src/templatepkg b/trunk/src/templatepkg index e337849..3b77b97 100755 --- a/trunk/src/templatepkg +++ b/trunk/src/templatepkg @@ -170,12 +170,16 @@ function template_create { local template_base info_commit orig_template if [ ! -d "`dirname $TEMPLATE_BASE`" ]; then + + echo Creating template `basename $TEMPLATE_BASE`... + if use_svn && [ -d "`dirname $TEMPLATE_BASE`/.svn" ]; then cd `dirname $TEMPLATE_BASE` svn mkdir `dirname $TEMPLATE_BASE` else mkdir -p `dirname $TEMPLATE_BASE` fi + else echo $BASENAME: template `basename $TEMPLATE_BASE` already exists exit 1 @@ -208,6 +212,10 @@ function template_create { info_commit="yes" fi + elif use_svn && [ -d "$BASE_CONF/templates/.svn" ]; then + cd $BASE_CONF/templates + svn add `basename $TEMPLATE_BASE` + info_commit="yes" else mkdir $TEMPLATE_BASE.{d,s} fi @@ -231,8 +239,8 @@ function template_create { if use_svn && [ -d "$orig_template/.svn" ]; then rsync -av --exclude=.svn $orig_template/$ROOT.d/ $TEMPLATE_BASE.d/ - cd `dirname $TEMPLATE_BASE` - svn add $TEMPLATE_BASE.d/* + cd $BASE_CONF/templates + svn add `basename $TEMPLATE_BASE` info_commit="yes" else rsync -av $orig_template/$ROOT.d/ $TEMPLATE_BASE.d/ -- cgit v1.2.3