diff options
Diffstat (limited to 'trunk/src/templatepkg')
-rwxr-xr-x | trunk/src/templatepkg | 18 |
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 |