pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/extract Add .tar.7z support.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c49f31a37fd6
branches:  trunk
changeset: 609606:c49f31a37fd6
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Sat Oct 06 22:24:45 2012 +0000

description:
Add .tar.7z support.

diffstat:

 mk/extract/extract |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (44 lines):

diff -r cbfa9dd3a4b1 -r c49f31a37fd6 mk/extract/extract
--- a/mk/extract/extract        Sat Oct 06 22:24:32 2012 +0000
+++ b/mk/extract/extract        Sat Oct 06 22:24:45 2012 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: extract,v 1.13 2012/10/01 10:45:16 ryoon Exp $
+# $NetBSD: extract,v 1.14 2012/10/06 22:24:45 ryoon Exp $
 #
 # Copyright (c) 2006 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -119,6 +119,7 @@
 : ${UNZIP_CMD:=unzip}
 : ${UNZOO:=unzoo}
 : ${P7ZA:="7za x"}
+: ${P7ZA_SO:="7za x -so"}
 
 : ${TMPDIR:=/tmp}
 
@@ -181,6 +182,7 @@
 # Derive the compression format of the archive based on the file extension.
 case "$distfile" in
 *.gz|*.tgz|*.z)                        _cformat=gzip ;;
+*.7z)                          _cformat=7z ;;
 *.bz2|*.tbz|*.tbz2|*.bz)       _cformat=bzip ;;
 *.lzma)                                _cformat=lzma ;;
 *.xz)                          _cformat=xz ;;
@@ -194,6 +196,7 @@
 #
 case "$cformat" in
 gzip|compress) decompress_cat="${GZCAT}" ;;
+7z)            decompress_cat="${P7ZA_SO}" ;;
 bzip)          decompress_cat="${BZCAT}" ;;
 lzma)          decompress_cat="${XZCAT}" ;;
 xz)            decompress_cat="${XZCAT}" ;;
@@ -203,7 +206,7 @@
 
 # Derive the format of the archive based on the file extension.
 case "$distfile" in
-*.tar.gz|*.tgz|*-tar.gz|*_tar.gz|*.tar.bz2|*.tbz|*.tbz2|*.tar.lzma|*.tar.xz|*.tar.Z|*.tar.z|*.tar|*.tar.bz)
+*.tar.gz|*.tgz|*-tar.gz|*_tar.gz|*.tar.bz2|*.tbz|*.tbz2|*.tar.lzma|*.tar.xz|*.tar.Z|*.tar.z|*.tar|*.tar.bz|*.tar.7z)
                _format=tar ;;
 *.cpio|*.cpio.gz|*.cpio.bz2)
                _format=cpio ;;



Home | Main Index | Thread Index | Old Index