summaryrefslogtreecommitdiffstats
path: root/convert-to-any
diff options
context:
space:
mode:
Diffstat (limited to 'convert-to-any')
-rwxr-xr-xconvert-to-any8
1 files changed, 7 insertions, 1 deletions
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