From f1b7557d23c601a86a03cd5eee4feb4072a3b8b2 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Tue, 2 Jun 2009 19:31:47 +0200 Subject: compute compression option from file extension bsdtar does not detect the compression type from the file extension. So we need to set the right option on our own. Signed-off-by: Aaron Griffin --- convert-to-any | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'convert-to-any') diff --git a/convert-to-any b/convert-to-any index 862c60b..2ad1521 100755 --- a/convert-to-any +++ b/convert-to-any @@ -62,7 +62,13 @@ fi sed -i "s/arch = \(i686\|x86_64\)/arch = any/g" package/.PKGINFO pushd package >/dev/null -fakeroot bsdtar cf "$OUTDIR/$newpkgname" .PKGINFO * +case "$newpkgname" in + *tar.gz) TAR_OPT="z" ;; + *tar.bz2) TAR_OPT="j" ;; + *tar.xz) TAR_OPT="J" ;; + *) die "$newpkgname does not have a valid archive extension." ;; +esac +fakeroot bsdtar c${TAR_OPT}f "$OUTDIR/$newpkgname" .PKGINFO * popd >/dev/null popd >/dev/null -- cgit v1.2.3-24-g4f1b