With the default of -6 produced much smaller tarball than
.gz (7z produced) and .bz2
-rw-r--r-- 1 bingos bingos
13601234 Sep 29 20:07 perl-5.21.5.tar.bz2
-rw-r--r-- 1 bingos bingos
15699515 Sep 29 20:07 perl-5.21.5.tar.gz
-rw-r--r-- 1 bingos bingos
10982580 Sep 29 20:08 perl-5.21.5.tar.xz
It's an option if we ever need it.
defaults to the concatenation of the local_patches entry
in patchlevel.h (or blank, if none)
-b make a .bz2 file in addtion to a .gz file
+ -x make a .xz file in addtion to a .gz file
-n do not make any tarballs, just the directory
EOF
my %opts;
-getopts('bnr:s:', \%opts) or usage;
+getopts('bxnr:s:', \%opts) or usage;
@ARGV && usage;
$relroot = defined $opts{r} ? $opts{r} : "..";
}
}
+if ($opts{x}) {
+ print "Creating and compressing the tar.gz file with 7z...\n";
+ $cmd = "tar cf - $reldir | xz -z -c > $reldir.tar.xz";
+ system($cmd) == 0 or die "$cmd failed";
+}
+
print "\n";
system("ls -ld $perl*");