From 21469844a5f7003034e43bf4f08db09d307a1b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 7 Dec 2010 14:44:42 +0100 Subject: [PATCH] Avoid creating tarball multiple times. --- scripts/create-release.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/create-release.sh b/scripts/create-release.sh index 92c77be26..3fb94c05f 100755 --- a/scripts/create-release.sh +++ b/scripts/create-release.sh @@ -169,12 +169,17 @@ for kit in $KITS ; do rm -f scripts/lang-cleanup.sh cd .. + # Remove tar file possibly left from previous run + rm -f $name.tar + # Prepare distributions for comp in $COMPRESSIONS ; do case $comp in tbz|tgz|txz) - echo "* Creating $name.tar" - tar cf $name.tar $name + if [ ! -f $name.tar ] ; then + echo "* Creating $name.tar" + tar cf $name.tar $name + fi if [ $comp = tbz ] ; then echo "* Creating $name.tar.bz2" bzip2 -9k $name.tar @@ -187,7 +192,6 @@ for kit in $KITS ; do echo "* Creating $name.tar.gz" gzip -9c $name.tar > $name.tar.gz fi - rm $name.tar ;; zip) echo "* Creating $name.zip" @@ -205,6 +209,9 @@ for kit in $KITS ; do echo "WARNING: ignoring compression '$comp', not known!" ;; esac + + # Cleanup + rm -f $name.tar done # Remove directory with current dist set