git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] import-tars: Add support for tarballs compressed with lzma, xz

From
Ingmar Vanhassel <ingmar@exherbo.org>
Date
Oct 20, 2009, 08:59 UTC
Message-ID
<1256029177-22503-1-git-send-email-ingmar@exherbo.org>
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
---
 contrib/fast-import/import-tars.perl |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl
index 7001862..95438e1 100755
--- a/contrib/fast-import/import-tars.perl
+++ b/contrib/fast-import/import-tars.perl
@@ -20,7 +20,7 @@ use Getopt::Long;
 
 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 @@ foreach my $tar_file (@ARGV)
 	} 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 {
-- 
1.6.5.1
Next: Johannes Schindelin
Message 1 of 3 in “import-tars: Add support for tarballs compressed with lzma, xz”
  1. import-tars: Add support for tarballs compressed with lzma, xzIngmar Vanhassel, Oct 20, 2009
  2. Johannes SchindelinOct 20, 2009
  3. import-tars: Add support for tarballs compressed with lzma, xzIngmar Vanhassel, Oct 20, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.