aboutsummaryrefslogtreecommitdiff
path: root/trunk
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-04-04 13:08:51 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-04-04 13:08:51 +0000
commit233795e6dc987c6cdaf51ed10a82d57532013dfe (patch)
tree12a396ad152f9709081710d1fb5e7cd13f5d7254 /trunk
parentb9aa1ca3388e95f7135c94a21bffc90a92af2c70 (diff)
downloadsimplepkg-233795e6dc987c6cdaf51ed10a82d57532013dfe.tar.gz
simplepkg-233795e6dc987c6cdaf51ed10a82d57532013dfe.tar.bz2
templatepkg: small fix
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@220 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk')
-rwxr-xr-xtrunk/src/templatepkg18
1 files changed, 13 insertions, 5 deletions
diff --git a/trunk/src/templatepkg b/trunk/src/templatepkg
index f0fb007..a890221 100755
--- a/trunk/src/templatepkg
+++ b/trunk/src/templatepkg
@@ -93,7 +93,7 @@ function check_svn_repo {
function import_export_templates {
- # import from or export to $BASE_CONF in svn repository
+ # import from or export to $BASE_CONF in a svn repository
# usage: template_export <import|export> <repository>
local templates_folder basedir repository mode preposition
@@ -211,7 +211,7 @@ function template_update {
# update the template package list
- components="$TEMPLATE.template $TEMPLATE.perms $TEMPLATE.d $TEMPLATE.s"
+ components="$TEMPLATE_BASE.template $TEMPLATE_BASE.perms $TEMPLATE_BASE.d $TEMPLATE_BASE.s"
for component in $components; do
if [ ! -a "$component" ]; then
echo $BASENAME: template component not found: $component
@@ -268,7 +268,7 @@ function template_add {
# add a file in a template
# usage: template_add <jail-root> <file>
- local info_commit
+ local info_commit cwd
mkdir -p $TEMPLATE_BASE.d
@@ -290,9 +290,13 @@ function template_add {
mkdir -p $TEMPLATE_BASE.d/`dirname $candidate`
cp -a $jail/$candidate $TEMPLATE_BASE.d/$candidate
if use_svn && [ -d "$TEMPLATE_BASE.d/.svn" ]; then
+ cwd="`pwd`"
cd $TEMPLATE_BASE.d
svn add ./$candidate
- # TODO: error checking
+ if [ "$?" != "0" ]; then
+ echo $BASENAME: error adding $candidate into the revision system
+ fi
+ cd $cwd
info_commit="yes"
else
echo Added $jail/$candidate on $TEMPLATE_BASE.d/$candidate
@@ -315,9 +319,13 @@ function template_add {
destination="`echo $TEMPLATE_BASE.d/$file | sed -e 's/\/$//'`"
cp -a $jail/$file $destination
if use_svn && [ -d "$TEMPLATE_BASE.d/.svn" ]; then
+ cwd="`pwd`"
cd $TEMPLATE_BASE.d
svn add ./$file
- # TODO: error checking
+ if [ "$?" != "0" ]; then
+ echo $BASENAME: error adding $candidate into the revision system
+ fi
+ cd $cwd
echo $BASENAME: please run jail-commit to add $file into the svn repository
true
else