diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-04-05 21:06:24 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-04-05 21:06:24 +0000 |
commit | 857c396e3a1ba281db89fccf23cde5b12a2766c2 (patch) | |
tree | 5f177474cced28566c440b708840dd44a9f399c4 /trunk/src/templatepkg | |
parent | e9605e5b5644d4e98a4a87f16b4447c7219b1a0e (diff) | |
download | simplepkg-857c396e3a1ba281db89fccf23cde5b12a2766c2.tar.gz simplepkg-857c396e3a1ba281db89fccf23cde5b12a2766c2.tar.bz2 |
templatepkg: small fixes
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@260 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/src/templatepkg')
-rwxr-xr-x | trunk/src/templatepkg | 12 |
1 files changed, 10 insertions, 2 deletions
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/ |