From: rhatto Date: Thu, 11 Dec 2008 17:56:41 +0000 (+0000) Subject: mkbuild: new function submit_cleanup X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=3afcda798050736c893d6eef885c51a36ef0ac1f;p=simplepkg.git mkbuild: new function submit_cleanup git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@651 04377dda-e619-0410-9926-eae83683ac58 --- diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild index 8a5fa05..fa4ca6b 100755 --- a/trunk/src/mkbuild +++ b/trunk/src/mkbuild @@ -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 }