diff options
author | David Mitchell <davem@iabyn.com> | 2009-07-25 11:54:16 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2009-07-25 11:54:16 +0100 |
commit | 85bdf03b25729816eedfea55a7f2c32c4bb80fba (patch) | |
tree | 45a6b90722b8463b87db2d9b8a55e9734998aac3 /Porting/makerel | |
parent | 7840a289bfa1b7a230055bb32f02d6873672b75b (diff) | |
download | perl-85bdf03b25729816eedfea55a7f2c32c4bb80fba.tar.gz |
add -b option to makerel to make a .bz2 file
Diffstat (limited to 'Porting/makerel')
-rw-r--r-- | Porting/makerel | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Porting/makerel b/Porting/makerel index b126164337..8c9e9c1a56 100644 --- a/Porting/makerel +++ b/Porting/makerel @@ -16,16 +16,17 @@ use Getopt::Std; $|=1; sub usage { die <<EOF; } -usage: $0 [ -r rootdir ] [-s suffix ] +usage: $0 [ -r rootdir ] [-s suffix ] [ -b ] -r rootdir directory under which to create the build dir and tarball defaults to '..' -s suffix suffix to append to to the perl-x.y.z dir and tarball name defaults to the concatenaion of the local_patches entry in patchlevel.h (or blank, if none) + -b make a .bz2 file in addtion to a .gz file EOF my %opts; -getopts('r:s:', \%opts) or usage; +getopts('br:s:', \%opts) or usage; @ARGV && usage; $relroot = defined $opts{r} ? $opts{r} : ".."; @@ -186,11 +187,17 @@ print "\n"; chdir ".." or die $!; -print "Creating and compressing the tar file...\n"; my $src = (-e $perl) ? $perl : 'perl'; # 'perl' in maint branch + +print "Creating and compressing the tar.gz file...\n"; $cmd = "tar cf - $reldir | gzip --best > $reldir.tar.gz"; -system($cmd) == 0 - or die "$cmd failed"; -print "\n"; +system($cmd) == 0 or die "$cmd failed"; +if ($opts{b}) { + print "Creating and compressing the tar.bz2 file...\n"; + $cmd = "tar cf - $reldir | bzip2 > $reldir.tar.bz2"; + system($cmd) == 0 or die "$cmd failed"; +} + +print "\n"; system("ls -ld $perl*"); |