]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
mkbuild: new function submit_cleanup
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 11 Dec 2008 17:56:41 +0000 (17:56 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 11 Dec 2008 17:56:41 +0000 (17:56 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@651 04377dda-e619-0410-9926-eae83683ac58

trunk/src/mkbuild

index 8a5fa0539420a113a33e5a4f784bf396c519857e..fa4ca6baa13ab21de8947c03d05bfeff6141a966 100755 (executable)
@@ -600,13 +600,9 @@ function submit_slackbuild {
     fi
   done
 
+  submit_cleanup
   cd $WORK
 
-  # remove files that should not be stored at the mkbuilds repository
-  if [ "$(cd $(dirname $MKBUILD_PATH) ; pwd)" == "$WORK" ]; then
-    rm -f *.old *.tmp *.SlackBuild *.slack-required
-  fi
-
 }
 
 function submit_mkbuild {
@@ -645,11 +641,19 @@ function submit_mkbuild {
     fi
   done  
 
+  submit_cleanup
   cd $WORK
 
+}
+
+function submit_cleanup {
+
   # remove files that should not be stored at the mkbuilds repository
   if [ "$(cd $(dirname $MKBUILD_PATH) ; pwd)" == "$WORK" ]; then
-    rm -f *.old *.tmp *.SlackBuild *.slack-required
+    (
+      cd $WORK
+      rm -f *.old *.tmp *.SlackBuild *.slack-required
+    )
   fi
 
 }