X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=build-tools%2Fmake-release;h=a8ba7baeb65c92e066a88f32d38bfbe3a48b3996;hp=e2b235b2f202429fff080a89c6554ce31746fe2c;hb=d477118fbda470c6f9f890a1a3f45ad8bad97be5;hpb=f775c0fb6f9191dcf5d226bfddbf82f52cd1116c diff --git a/build-tools/make-release b/build-tools/make-release index e2b235b..a8ba7ba 100755 --- a/build-tools/make-release +++ b/build-tools/make-release @@ -1,12 +1,14 @@ #!/usr/bin/perl +use warnings; +use strict; use Getopt::Long; use Pod::Usage; use File::Path; use File::Temp; -my $tag; -my $last; +my $help; +my $man; my $tagPoint; my $last; my $outDir = "."; @@ -64,6 +66,9 @@ system("git describe --abbrev=4 $tagName > $tempDir/$name/.version"); system ("cd $tempDir/$name && ./regen.sh") == 0 or die $!; +# A list of files to compress +my @toCompress; + # Create the documentation tarball system("tar -cf $outDir/$name-doc.tar -C $tempDir $name/doc") == 0 or die "Unable to create documentation tarball : $!"; @@ -74,7 +79,7 @@ File::Path::rmtree("$tempDir/$name/doc"); # Create the source tarball (both .gz and .bz2) system("tar -cf $outDir/$name-src.tar -C $tempDir $name") == 0 - or die "Unable to create documentation tarball : $!"; + or die "Unable to create source code tarball : $!"; push @toCompress, "$outDir/$name-src.tar"; # Construct the diffs, and zip them @@ -84,9 +89,10 @@ if ($last) { push @toCompress, "$outDir/$name.diff"; } -my @toMD5 = @toCompress; +my @toMD5; -# Compress everything that needs squashing +# Compress everything that needs squashing, +# and also set up a list for md5 checksumming. foreach my $file (@toCompress) { system("gzip < $file > $file.gz") == 0 or die "Unable to create gzip file of '$file' : $!"; @@ -95,6 +101,14 @@ foreach my $file (@toCompress) { system("bzip2 < $file > $file.bz2") == 0 or die "Unable to create bzip file of '$file' : $!"; push @toMD5, "$file.bz2"; + + # Delete the uncompressed tar files. + if ($file =~ /\.tar$/) { + unlink($file); + } else { + # Otherwise, queue this file for md5 checksumming. + push @toMD5, $file; + } } foreach my $file (@toMD5) {