diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-04-04 12:48:58 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-04-04 12:48:58 +0000 |
commit | b9aa1ca3388e95f7135c94a21bffc90a92af2c70 (patch) | |
tree | ced03a1d7ac8d9f2788ba7c8a7e3b085f84f7893 /trunk | |
parent | 02706ca126a16fe1fdfa265647a46d8ad5c50ad0 (diff) | |
download | simplepkg-b9aa1ca3388e95f7135c94a21bffc90a92af2c70.tar.gz simplepkg-b9aa1ca3388e95f7135c94a21bffc90a92af2c70.tar.bz2 |
templatepkg: small changes
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@219 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk')
-rwxr-xr-x | trunk/src/templatepkg | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/trunk/src/templatepkg b/trunk/src/templatepkg index eb7b56f..f0fb007 100755 --- a/trunk/src/templatepkg +++ b/trunk/src/templatepkg @@ -289,8 +289,10 @@ function template_add { if [ ! -a "$TEMPLATE_BASE.d/$candidate" ]; then mkdir -p $TEMPLATE_BASE.d/`dirname $candidate` cp -a $jail/$candidate $TEMPLATE_BASE.d/$candidate - if use_svn; then - ( cd $TEMPLATE_BASE.d && svn add ./$candidate ) + if use_svn && [ -d "$TEMPLATE_BASE.d/.svn" ]; then + cd $TEMPLATE_BASE.d + svn add ./$candidate + # TODO: error checking info_commit="yes" else echo Added $jail/$candidate on $TEMPLATE_BASE.d/$candidate @@ -312,8 +314,10 @@ function template_add { mkdir -p $TEMPLATE_BASE.d/`dirname $file`/ destination="`echo $TEMPLATE_BASE.d/$file | sed -e 's/\/$//'`" cp -a $jail/$file $destination - if use_svn; then - ( cd $TEMPLATE_BASE.d && svn add ./$file ) + if use_svn && [ -d "$TEMPLATE_BASE.d/.svn" ]; then + cd $TEMPLATE_BASE.d + svn add ./$file + # TODO: error checking echo $BASENAME: please run jail-commit to add $file into the svn repository true else |