aboutsummaryrefslogtreecommitdiff
path: root/trunk
diff options
context:
space:
mode:
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