Skip to content

Commit

Permalink
debtransform: Add support for .tgz names
Browse files Browse the repository at this point in the history
Adding support for .tgz as a valid tar.gz file name
as suggested by Michael Schroeder in
http://lists.opensuse.org/opensuse-packaging/2012-12/msg00034.html
  • Loading branch information
ralflang authored and adrianschroeter committed Dec 18, 2012
1 parent 181c190 commit f2e087a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion debtransform
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ if ($tags->{'DEBTRANSFORM-FILES-TAR'}) {
}

if (!$tarfile || !@debtarfiles) {
my @tars = grep {/\.tar(?:\.gz|\.bz2)?$/} @dir;
my @tars = grep {/\.tgz$|\.tar(?:\.gz|\.bz2)?$/} @dir;
my @debtars = grep {/^debian\.tar(?:\.gz|\.bz2)?$/} @tars;
if (!$tarfile) {
@tars = grep {!/^debian\.tar(?:\.gz|\.bz2)?$/} @tars;
Expand Down Expand Up @@ -279,6 +279,13 @@ if ($tarfile =~ /\.zip/) {
print "converting $dir/$old to $tarfile\n";
system( ( "debtransformzip", "$dir/$old", "$tmptar" )) == 0 || die("cannot transform .zip to .tar.gz");
}
if ($tarfile =~ /\.tgz$/) {
my $old = $tarfile;
$tarfile =~ s/\.tgz/\.tar.gz/;
$tmptar = "$out/$tarfile";
print "renaming $dir/$old to $tarfile\n";
system ( ("mv", "$dir/$old", "$tmptar" ) ) == 0 || die("cannot rename .tgz to .tar.gz");
}

my @files;
my $v = $version;
Expand Down

0 comments on commit f2e087a

Please sign in to comment.