--- debtransform | 13 ++++++++++--- debtransformxz | 6 ++++++ 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100755 debtransformxz diff --git a/debtransform b/debtransform index 3d18326..b5ae2e7 100755 --- a/debtransform +++ b/debtransform @@ -281,10 +281,10 @@ if ($tags->{'DEBTRANSFORM-FILES-TAR'}) { } if (!$tarfile || !@debtarfiles) { - my @tars = grep {/\.tgz$|\.tar(?:\.gz|\.bz2)?$/} @dir; - my @debtars = grep {/^debian\.tar(?:\.gz|\.bz2)?$/} @tars; + my @tars = grep {/\.tgz$|\.tar(?:\.gz|\.bz2|\.xz)?$/} @dir; + my @debtars = grep {/^debian\.tar(?:\.gz|\.bz2|\.xz)?$/} @tars; if (!$tarfile) { - @tars = grep {!/^debian\.tar(?:\.gz|\.bz2)?$/} @tars; + @tars = grep {!/^debian\.tar(?:\.gz|\.bz2|\.xz)?$/} @tars; if (@debtarfiles) { my %debtarfiles = map {$_ => 1} @debtarfiles; @tars = grep {!$debtarfiles{$_}} @tars; @@ -315,6 +315,13 @@ if ($tarfile =~ /\.tar\.bz2/) { print "converting $dir/$old to $tarfile\n"; system( ( "debtransformbz2", "$dir/$old", "$tmptar" )) == 0 || die("cannot transform .tar.bz2 to .tar.gz"); } +if ($tarfile =~ /\.tar\.xz/) { + my $old = $tarfile; + $tarfile =~ s/\.tar\.xz/\.tar\.gz/; + $tmptar = "$out/$tarfile"; + print "converting $dir/$old to $tarfile\n"; + system( ( "debtransformxz", "$dir/$old", "$tmptar" )) == 0 || die("cannot transform .tar.xz to .tar.gz"); +} if ($tarfile =~ /\.zip/) { my $old = $tarfile; $tarfile =~ s/\.zip/\.tar\.gz/; diff --git a/debtransformxz b/debtransformxz new file mode 100755 index 0000000..91d0f83 --- /dev/null +++ b/debtransformxz @@ -0,0 +1,6 @@ +#!/bin/sh +if test $# -ne 2; then + exit 1 +fi +xz -cd "$1" | gzip -f - >"$2" || exit 1 +exit 0 -- 2.4.0 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org