]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
templatepkg: small changes
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Wed, 4 Apr 2007 12:48:58 +0000 (12:48 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Wed, 4 Apr 2007 12:48:58 +0000 (12:48 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@219 04377dda-e619-0410-9926-eae83683ac58

trunk/src/templatepkg

index eb7b56f3981da8603feb523a13c430229392af8b..f0fb007c8a66afd163e2ee3d202c792d924a3ea0 100755 (executable)
@@ -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