add support for .xz compressed files like .lzma
authorMike Frysinger <vapier@gentoo.org>
Sun, 8 Feb 2009 18:40:14 +0000 (18:40 -0000)
committerMike Frysinger <vapier@gentoo.org>
Sun, 8 Feb 2009 18:40:14 +0000 (18:40 -0000)
svn path=/main/trunk/; revision=12593

bin/ebuild.sh

index 301eb7949b3ffd324efa28c6632e6487aaf026d9..93558f39e2ec2dccfa716a1a1052b01d5a13fa06 100755 (executable)
@@ -434,6 +434,14 @@ unpack() {
                                        lzma -dc "${srcdir}${x}" > ${x%.*} || die "$myfail"
                                fi
                                ;;
+                       xz)
+                               if [ "${y}" == "tar" ]; then
+                                       xz -dc "${srcdir}${x}" | tar xof - ${tar_opts}
+                                       assert "$myfail"
+                               else
+                                       xz -dc "${srcdir}${x}" > ${x%.*} || die "$myfail"
+                               fi
+                               ;;
                        *)
                                vecho "unpack ${x}: file format not recognized. Ignoring."
                                ;;