mirror of
https://github.com/git/git.git
synced 2024-10-31 14:27:54 +01:00
Merge branch 'iv/tar-lzma-xz'
* iv/tar-lzma-xz: import-tars: Add support for tarballs compressed with lzma, xz
This commit is contained in:
commit
18432dfd88
1 changed files with 4 additions and 1 deletions
|
@ -20,7 +20,7 @@
|
|||
|
||||
my $metaext = '';
|
||||
|
||||
die "usage: import-tars [--metainfo=extension] *.tar.{gz,bz2,Z}\n"
|
||||
die "usage: import-tars [--metainfo=extension] *.tar.{gz,bz2,lzma,xz,Z}\n"
|
||||
unless GetOptions('metainfo=s' => \$metaext) && @ARGV;
|
||||
|
||||
my $branch_name = 'import-tars';
|
||||
|
@ -49,6 +49,9 @@
|
|||
} elsif ($tar_name =~ s/\.tar\.Z$//) {
|
||||
open(I, '-|', 'uncompress', '-c', $tar_file)
|
||||
or die "Unable to uncompress -c $tar_file: $!\n";
|
||||
} elsif ($tar_name =~ s/\.(tar\.(lzma|xz)|(tlz|txz))$//) {
|
||||
open(I, '-|', 'xz', '-dc', $tar_file)
|
||||
or die "Unable to xz -dc $tar_file: $!\n";
|
||||
} elsif ($tar_name =~ s/\.tar$//) {
|
||||
open(I, $tar_file) or die "Unable to open $tar_file: $!\n";
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue