summarylogtreecommitdiffstats
path: root/deb2targz-any-data.patch
blob: c8c42308ce1cc1a5c3a667bccb8df02660fd2f61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Support any/all compression formats for data.tar
--- deb2targz
+++ deb2targz
@@ -47,10 +47,11 @@
 	($header, $data) = ($data =~ /(.*?)\n(.*)/s);
 	my($name, $num1, $num2, $num3, $num4, $len) = split /\s+/, $header;
 	#print "header='$header'\n\tname='$name', len=$len\n";
-	if ($name eq "data.tar.gz") {
+	if ($name =~ /^data\.tar(.*)$/) {
 	    # Found it
+	    my $ext = $1;
 	    $data = substr($data, 0, $len);
-	    $filename =~ s/\.deb$/.tar.gz/;
+	    $filename =~ s/\.deb$/.tar$ext/;
 	    my $fh = new IO::File(">$filename")
 		or die "can't write '$filename': $!";
 	    print $fh $data;