diff options
author | ryoon <ryoon@pkgsrc.org> | 2012-10-06 22:24:45 +0000 |
---|---|---|
committer | ryoon <ryoon@pkgsrc.org> | 2012-10-06 22:24:45 +0000 |
commit | cc8fb702d6bce1b7011c73511f91fb1a12c6496f (patch) | |
tree | a9fb4bbf8d10e432c62c5c8bdba4d19907128668 /mk/extract | |
parent | b5c4602cde1efa18bc887415a5ab650df77e0769 (diff) | |
download | pkgsrc-cc8fb702d6bce1b7011c73511f91fb1a12c6496f.tar.gz |
Add .tar.7z support.
Diffstat (limited to 'mk/extract')
-rwxr-xr-x | mk/extract/extract | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mk/extract/extract b/mk/extract/extract index 8966e4f7b0d..ac9b1f4594c 100755 --- a/mk/extract/extract +++ b/mk/extract/extract @@ -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 @@ set -u # treat undefined variables as errors : ${UNZIP_CMD:=unzip} : ${UNZOO:=unzoo} : ${P7ZA:="7za x"} +: ${P7ZA_SO:="7za x -so"} : ${TMPDIR:=/tmp} @@ -181,6 +182,7 @@ esac # 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 @@ ${TEST} -n "$cformat" || cformat="$_cformat" # 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 @@ esac # 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 ;; |