aboutsummaryrefslogtreecommitdiff
path: root/trunk
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-04-04 19:53:35 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-04-04 19:53:35 +0000
commit8fa377e4e48c2a64cc229cb1d901637f7a90e1e1 (patch)
tree8df70ffb88eb97891f9cc7223b4307763c831b5f /trunk
parent2d979f783b11c05450d449633ba55e6702b4e798 (diff)
downloadsimplepkg-8fa377e4e48c2a64cc229cb1d901637f7a90e1e1.tar.gz
simplepkg-8fa377e4e48c2a64cc229cb1d901637f7a90e1e1.tar.bz2
templatepkg: -a fixed
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@233 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk')
-rwxr-xr-xtrunk/src/templatepkg27
1 files changed, 21 insertions, 6 deletions
diff --git a/trunk/src/templatepkg b/trunk/src/templatepkg
index b0afb3b..c537a52 100755
--- a/trunk/src/templatepkg
+++ b/trunk/src/templatepkg
@@ -297,7 +297,7 @@ function template_add {
cd $cwd
info_commit="yes"
else
- echo Added `slash $jail/$candidate` on $TEMPLATE_BASE.d/$candidate
+ echo Added `slash $jail/$candidate` on `slash $TEMPLATE_BASE.d/$candidate`
fi
fi
done
@@ -311,23 +311,38 @@ function template_add {
exit 1
fi
else
+
if [ -a "$jail/$file" ]; then
- mkdir -p $TEMPLATE_BASE.d/`dirname $file`/
destination="`echo $TEMPLATE_BASE.d/$file | sed -e 's/\/$//'`"
- cp -a $jail/$file $destination
+
if use_svn && [ -d "$TEMPLATE_BASE.d/.svn" ]; then
+
+ if ! svn_check $TEMPLATE_BASE.d/`dirname $file`; then
+ mkdir -p $TEMPLATE_BASE.d/`dirname $file`/
+ svn add $TEMPLATE_BASE.d/`dirname $file`/
+ fi
+
+ cp -a $jail/$file $destination
+
cwd="`pwd`"
cd $TEMPLATE_BASE.d
svn add ./$file
+
if [ "$?" != "0" ]; then
echo $BASENAME: error adding `slash $candidate` into the revision system
+ else
+ echo $BASENAME: please run jail-commit to add `slash $file` into the svn repository
fi
+
cd $cwd
- echo $BASENAME: please run jail-commit to add `slash $file` into the svn repository
- true
+
else
- echo Added `slash $jail/$file` on $destination
+
+ mkdir -p $TEMPLATE_BASE.d/`dirname $file`/
+ cp -a $jail/$file $destination
+ echo Added `slash $jail/$file` on `slash $destination`
+
fi
else