head 1.21; access; symbols pkgsrc-2023Q4:1.21.0.16 pkgsrc-2023Q4-base:1.21 pkgsrc-2023Q3:1.21.0.14 pkgsrc-2023Q3-base:1.21 pkgsrc-2023Q2:1.21.0.12 pkgsrc-2023Q2-base:1.21 pkgsrc-2023Q1:1.21.0.10 pkgsrc-2023Q1-base:1.21 pkgsrc-2022Q4:1.21.0.8 pkgsrc-2022Q4-base:1.21 pkgsrc-2022Q3:1.21.0.6 pkgsrc-2022Q3-base:1.21 pkgsrc-2022Q2:1.21.0.4 pkgsrc-2022Q2-base:1.21 pkgsrc-2022Q1:1.21.0.2 pkgsrc-2022Q1-base:1.21 pkgsrc-2021Q4:1.19.0.20 pkgsrc-2021Q4-base:1.19 pkgsrc-2021Q3:1.19.0.18 pkgsrc-2021Q3-base:1.19 pkgsrc-2021Q2:1.19.0.16 pkgsrc-2021Q2-base:1.19 pkgsrc-2021Q1:1.19.0.14 pkgsrc-2021Q1-base:1.19 pkgsrc-2020Q4:1.19.0.12 pkgsrc-2020Q4-base:1.19 pkgsrc-2020Q3:1.19.0.10 pkgsrc-2020Q3-base:1.19 pkgsrc-2020Q2:1.19.0.8 pkgsrc-2020Q2-base:1.19 pkgsrc-2020Q1:1.19.0.4 pkgsrc-2020Q1-base:1.19 pkgsrc-2019Q4:1.19.0.6 pkgsrc-2019Q4-base:1.19 pkgsrc-2019Q3:1.19.0.2 pkgsrc-2019Q3-base:1.19 pkgsrc-2019Q2:1.18.0.6 pkgsrc-2019Q2-base:1.18 pkgsrc-2019Q1:1.18.0.4 pkgsrc-2019Q1-base:1.18 pkgsrc-2018Q4:1.18.0.2 pkgsrc-2018Q4-base:1.18 pkgsrc-2018Q3:1.17.0.2 pkgsrc-2018Q3-base:1.17 pkgsrc-2018Q2:1.16.0.40 pkgsrc-2018Q2-base:1.16 pkgsrc-2018Q1:1.16.0.38 pkgsrc-2018Q1-base:1.16 pkgsrc-2017Q4:1.16.0.36 pkgsrc-2017Q4-base:1.16 pkgsrc-2017Q3:1.16.0.34 pkgsrc-2017Q3-base:1.16 pkgsrc-2017Q2:1.16.0.30 pkgsrc-2017Q2-base:1.16 pkgsrc-2017Q1:1.16.0.28 pkgsrc-2017Q1-base:1.16 pkgsrc-2016Q4:1.16.0.26 pkgsrc-2016Q4-base:1.16 pkgsrc-2016Q3:1.16.0.24 pkgsrc-2016Q3-base:1.16 pkgsrc-2016Q2:1.16.0.22 pkgsrc-2016Q2-base:1.16 pkgsrc-2016Q1:1.16.0.20 pkgsrc-2016Q1-base:1.16 pkgsrc-2015Q4:1.16.0.18 pkgsrc-2015Q4-base:1.16 pkgsrc-2015Q3:1.16.0.16 pkgsrc-2015Q3-base:1.16 pkgsrc-2015Q2:1.16.0.14 pkgsrc-2015Q2-base:1.16 pkgsrc-2015Q1:1.16.0.12 pkgsrc-2015Q1-base:1.16 pkgsrc-2014Q4:1.16.0.10 pkgsrc-2014Q4-base:1.16 pkgsrc-2014Q3:1.16.0.8 pkgsrc-2014Q3-base:1.16 pkgsrc-2014Q2:1.16.0.6 pkgsrc-2014Q2-base:1.16 pkgsrc-2014Q1:1.16.0.4 pkgsrc-2014Q1-base:1.16 pkgsrc-2013Q4:1.16.0.2 pkgsrc-2013Q4-base:1.16 pkgsrc-2013Q3:1.15.0.6 pkgsrc-2013Q3-base:1.15 pkgsrc-2013Q2:1.15.0.4 pkgsrc-2013Q2-base:1.15 pkgsrc-2013Q1:1.15.0.2 pkgsrc-2013Q1-base:1.15 pkgsrc-2012Q4:1.14.0.2 pkgsrc-2012Q4-base:1.14 pkgsrc-2012Q3:1.12.0.16 pkgsrc-2012Q3-base:1.12 pkgsrc-2012Q2:1.12.0.14 pkgsrc-2012Q2-base:1.12 pkgsrc-2012Q1:1.12.0.12 pkgsrc-2012Q1-base:1.12 pkgsrc-2011Q4:1.12.0.10 pkgsrc-2011Q4-base:1.12 pkgsrc-2011Q3:1.12.0.8 pkgsrc-2011Q3-base:1.12 pkgsrc-2011Q2:1.12.0.6 pkgsrc-2011Q2-base:1.12 pkgsrc-2011Q1:1.12.0.4 pkgsrc-2011Q1-base:1.12 pkgsrc-2010Q4:1.12.0.2 pkgsrc-2010Q4-base:1.12 pkgsrc-2010Q3:1.11.0.6 pkgsrc-2010Q3-base:1.11 pkgsrc-2010Q2:1.11.0.4 pkgsrc-2010Q2-base:1.11 pkgsrc-2010Q1:1.11.0.2 pkgsrc-2010Q1-base:1.11 pkgsrc-2009Q4:1.10.0.4 pkgsrc-2009Q4-base:1.10 pkgsrc-2009Q3:1.10.0.2 pkgsrc-2009Q3-base:1.10 pkgsrc-2009Q2:1.8.0.6 pkgsrc-2009Q2-base:1.8 pkgsrc-2009Q1:1.8.0.4 pkgsrc-2009Q1-base:1.8 pkgsrc-2008Q4:1.8.0.2 pkgsrc-2008Q4-base:1.8 pkgsrc-2008Q3:1.7.0.14 pkgsrc-2008Q3-base:1.7 cube-native-xorg:1.7.0.12 cube-native-xorg-base:1.7 pkgsrc-2008Q2:1.7.0.10 pkgsrc-2008Q2-base:1.7 cwrapper:1.7.0.8 pkgsrc-2008Q1:1.7.0.6 pkgsrc-2008Q1-base:1.7 pkgsrc-2007Q4:1.7.0.4 pkgsrc-2007Q4-base:1.7 pkgsrc-2007Q3:1.7.0.2 pkgsrc-2007Q3-base:1.7 pkgsrc-2007Q2:1.6.0.8 pkgsrc-2007Q2-base:1.6 pkgsrc-2007Q1:1.6.0.6 pkgsrc-2007Q1-base:1.6 jlam-pkgviews:1.6.0.4 jlam-pkgviews-base:1.6 pkgsrc-2006Q4:1.6.0.2 pkgsrc-2006Q4-base:1.6 pkgsrc-2006Q3:1.3.0.2 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.1.0.2 pkgsrc-2006Q2-base:1.1; locks; strict; comment @# @; 1.21 date 2022.01.06.10.30.50; author schmonz; state Exp; branches; next 1.20; commitid hlPk9BhN1IodPynD; 1.20 date 2022.01.06.10.19.11; author schmonz; state Exp; branches; next 1.19; commitid cWArE5dDq238LynD; 1.19 date 2019.08.02.11.48.17; author nia; state Exp; branches; next 1.18; commitid oPDA5qscAO5uNrxB; 1.18 date 2018.10.23.16.39.29; author minskim; state Exp; branches; next 1.17; commitid 8AOFw8rLMCQbv6XA; 1.17 date 2018.08.22.20.48.37; author maya; state Exp; branches; next 1.16; commitid FMEpDDTKwDQBR9PA; 1.16 date 2013.11.16.07.45.26; author shattered; state Exp; branches; next 1.15; commitid XpgMvrGjTSOlttdx; 1.15 date 2013.02.28.18.26.22; author jperkin; state Exp; branches; next 1.14; 1.14 date 2012.10.06.22.24.45; author ryoon; state Exp; branches; next 1.13; 1.13 date 2012.10.01.10.45.16; author ryoon; state Exp; branches; next 1.12; 1.12 date 2010.12.22.09.33.30; author tron; state Exp; branches; next 1.11; 1.11 date 2010.01.16.17.08.34; author wiz; state Exp; branches; next 1.10; 1.10 date 2009.08.25.11.56.35; author wiz; state Exp; branches; next 1.9; 1.9 date 2009.07.08.13.27.52; author minskim; state Exp; branches; next 1.8; 1.8 date 2008.11.15.20.25.34; author minskim; state Exp; branches; next 1.7; 1.7 date 2007.07.31.17.42.40; author jlam; state Exp; branches; next 1.6; 1.6 date 2006.10.18.19.18.12; author ben; state Exp; branches; next 1.5; 1.5 date 2006.10.18.16.17.42; author ben; state Exp; branches; next 1.4; 1.4 date 2006.10.15.01.56.06; author minskim; state Exp; branches; next 1.3; 1.3 date 2006.09.13.11.10.36; author joerg; state Exp; branches; next 1.2; 1.2 date 2006.09.03.16.36.37; author schwarz; state Exp; branches; next 1.1; 1.1 date 2006.06.06.03.05.48; author jlam; state Exp; branches; next ; desc @@ 1.21 log @Remove leftover debug statement, spotted by wiz@@. @ text @#!/bin/sh # # $NetBSD: extract,v 1.20 2022/01/06 10:19:11 schmonz Exp $ # # Copyright (c) 2006 The NetBSD Foundation, Inc. # All rights reserved. # # This code is derived from software contributed to The NetBSD Foundation # by Johnny C. Lam. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # ###################################################################### # # NAME # extract -- extract distfile, regardless of format # # SYNOPSIS # extract [options] distfile [file ...] # # DESCRIPTION # extract will unpack the contents of the named distfile into the # current working directory. If any optional files are specified then # only they will be extracted from the distfile, provided that the # underlying tool supports this ability. If the distfile's file # extension doesn't match any known archive format's, then the # distfile is simply copied into the current working directory. If # "-" is given as the distfile, then standard input is used as the # contents of the archive, provided that the underlying tool supports # this ability. # # OPTIONS # -c format Force interpretation of the distfile's compression # format to be the specified format. Valid formats # are: gzip, bzip, compress, and none. # # -d dir Extract the files into the specified dir instead # of the current working directory. If the directory # doesn't exist, then it is created along with any # intermediate directories using the current umask. # # -f format Force interpretation of the distfile's archive # format to be the specified format. # # -t tarprog This specifies the tool to use to extract tar/ustar # archives, and may be either "tar" or "pax", or the # full path to the program. # # -X excludefile excludefile is a list of file patterns to exclude # from extraction. If the -X option is specified # then any optional files listed on the command line # are ignored. # # -x This causes the optional files listed on the # command line to be excluded from extraction, # provided the underlying tool supports this # ability. # # ENVIRONMENT # EXTRACT_OPTS_BIN # EXTRACT_OPTS_LHA # EXTRACT_OPTS_PAX # EXTRACT_OPTS_RAR # EXTRACT_OPTS_RPM # EXTRACT_OPTS_TAR # EXTRACT_OPTS_ZIP # EXTRACT_OPTS_ZSTD # EXTRACT_OPTS_ZOO # These variables set additional arguments passed to the # underlying extraction tool to unpack their respective # archive formats. # ###################################################################### set -e # exit on errors set -u # treat undefined variables as errors : ${BZCAT:=bzcat} : ${CAT:=cat} : ${CP:=cp} : ${ECHO:=echo} : ${GEM:="gem unpack"} : ${GZCAT:="gzip -cd"} : ${LHA:=lha} : ${LZCAT:="lzip -cd"} : ${MKDIR:=mkdir} : ${PAX:=pax} : ${RM:=rm} : ${RPM2PKG:=rpm2pkg} : ${SH:=sh} : ${TAR:=tar} : ${TEST:=test} : ${UNRAR:=unrar} : ${UNZIP_CMD:=unzip} : ${UNZOO:=unzoo} : ${P7ZA:="7za x"} : ${P7ZA_SO:="7za x -so"} : ${ZSTD:="zstd"} : ${TMPDIR:=/tmp} self="${0##*/}" usage() { ${ECHO} 1>&2 "usage: $self [-c format] [-d dir] [-f format] [-t tarprog] [-X excludefile | -x] distfile [file ...]" } exclude=no exclude_file= exclude_flag= extract_dir=. extract_using=tar format= cformat= # Process optional arguments while ${TEST} $# -gt 0; do case "$1" in -c) cformat="$2"; shift 2 ;; -d) extract_dir="$2"; shift 2 ;; -f) format="$2"; shift 2 ;; -t) extract_using="$2"; shift 2 ;; -X) exclude_file="$2"; shift 2 ;; -x) exclude=yes; shift ;; --) shift; break ;; -?*) ${ECHO} 1>&2 "$self: unknown option -- ${1#-}" usage exit 1 ;; *) break ;; esac done case "$extract_using" in /*tar|/*pax) tarprog="$extract_using" ;; *tar) tarprog="${TAR}" ;; *pax) tarprog="${PAX}" ;; *) tarprog="${TAR}" ;; esac if ${TEST} -n "$exclude_file" -a ! -f "$exclude_file"; then ${ECHO} 1>&2 "$self: exclude file missing: $exclude_file" exit 1 fi # Process required arguments ${TEST} $# -gt 0 || { usage; exit 1; } distfile="$1"; shift # Make distfile an absolute path, because we will change the current # directory soon. case "$distfile" in /*) ;; *) distfile=`exec pwd`/"$distfile" ;; esac # Derive the compression format of the archive based on the file extension. case "$distfile" in *.gz|*.tgz|*.z|*.crate) _cformat=gzip ;; *.7z) _cformat=7z ;; *.bz2|*.tbz|*.tbz2|*.bz) _cformat=bzip ;; *.lz) _cformat=lzip ;; *.lzma) _cformat=lzma ;; *.xz|*.txz) _cformat=xz ;; *.Z) _cformat=compress ;; *) _cformat=none ;; esac ${TEST} -n "$cformat" || cformat="$_cformat" # Derive the command to decompress the file and write the contents to # stdout, based on the file extension. # case "$cformat" in gzip|compress) decompress_cat="${GZCAT}" ;; 7z) decompress_cat="${P7ZA_SO}" ;; bzip) decompress_cat="${BZCAT}" ;; lzip) decompress_cat="${LZCAT}" ;; lzma) decompress_cat="${XZCAT}" ;; xz) decompress_cat="${XZCAT}" ;; none) decompress_cat="${CAT}" ;; *) decompress_cat="${CAT}" ;; esac # Derive the format of the archive based on the file extension. case "$distfile" in *.tar.gz|*.tgz|*-tar.gz|*_tar.gz|*.tar.bz2|*.txz|*.tbz|*.tbz2|*.tar.lz|*.tar.lzma|*.tar.xz|*.tar.Z|*.tar.z|*.tar|*.tar.bz|*.tar.7z|*.tar.zst|*.crate) _format=tar ;; *.cpio|*.cpio.gz|*.cpio.bz2) _format=cpio ;; *.shar.gz|*.shar.bz2|*.shar.Z|*.shar|*.shr.gz|*.shr.bz2|*.shr.Z|*.shr) _format=shar ;; *.zip|*.ZIP) _format=zip ;; *.lha|*.lzh) _format=lha ;; *.Z|*.bz2|*.gz|*.z) _format=compressed ;; *.zoo) _format=zoo ;; *.rar) _format=rar ;; *.rpm) _format=rpm ;; *.bin|*.sh) _format=jre-bin ;; *.gem) _format=gem ;; *.7z) _format=7z ;; *.zst) _format=zstd ;; *) _format=none ;; esac ${TEST} -n "$format" || format="$_format" case "$format" in tar|shar) ;; *) if ${TEST} "$distfile" = "-"; then ${ECHO} 1>&2 "$self: archive format cannot be given on standard input -- $format" exit 1 fi ;; esac ${TEST} -d "$extract_dir" || ${MKDIR} -p "$extract_dir" cd "$extract_dir" # Use the correct tool and extraction procedure to perform the extraction # based on the archive format. # case "$format" in tar) case "$extract_using" in *pax) : ${EXTRACT_OPTS_PAX=} case "$extract_using" in /*) paxprog="$extract_using" ;; *) paxprog="${PAX}" ;; esac if ${TEST} -n "$exclude_file"; then exclude=yes set -- dummy `${CAT} "$exclude_file"`; shift fi ${TEST} "$exclude" = no || exclude_flag="-c" $decompress_cat "$distfile" | $paxprog ${EXTRACT_OPTS_PAX} $exclude_flag -O -r ${1+"$@@"} ;; *tar) : ${EXTRACT_OPTS_TAR=} case "$extract_using" in /*) tarprog="$extract_using" ;; *) tarprog="${TAR}" ;; esac tmpfile= if ${TEST} "$exclude" = "yes"; then tmpfile="${TMPDIR}/$self.$$" ${RM} -f "$tmpfile" trap "\${RM} -f \"\$tmpfile\"" 0 for i in ${1+"$@@"}; do ${ECHO} "$i" >> "$tmpfile" done exclude_file="$tmpfile" fi if ${TEST} -n "$exclude_file"; then exclude_flag="-X $exclude_file" set -- dummy; shift fi $decompress_cat "$distfile" | $tarprog ${EXTRACT_OPTS_TAR} $exclude_flag -xf - ${1+"$@@"} ;; *) ${ECHO} 1>&2 "$self: unknown tar program: $extract_using" exit 1 esac ;; cpio) : ${EXTRACT_OPTS_PAX=} if ${TEST} -n "$exclude_file"; then exclude=yes set -- dummy `${CAT} "$exclude_file"`; shift fi ${TEST} "$exclude" = no || exclude_flag="-c" $decompress_cat "$distfile" | ${PAX} ${EXTRACT_OPTS_PAX} $exclude_flag -r ${1+"$@@"} ;; shar) $decompress_cat "$distfile" | ${SH} ;; zip) : ${EXTRACT_OPTS_ZIP=-aqo} ${TEST} "$exclude" = "no" || exclude_flag="-x" if ${TEST} -n "$exclude_file"; then set -- dummy `${CAT} "$exclude_file"`; shift fi ${UNZIP_CMD} ${EXTRACT_OPTS_ZIP} "$distfile" $exclude_flag ${1+"$@@"} ;; lha) : ${EXTRACT_OPTS_LHA=q} ${LHA} x${EXTRACT_OPTS_LHA} "$distfile" ${1+"$@@"} ;; compressed) target="${distfile##*/}"; target="${target%.*}" $decompress_cat "$distfile" > "$target" ;; zoo) : ${EXTRACT_OPTS_ZOO=} ${UNZOO} -x ${EXTRACT_OPTS_ZOO} "$distfile" ${1+"$@@"} ;; rar) : ${EXTRACT_OPTS_RAR=-inul} ${UNRAR} x ${EXTRACT_OPTS_RAR} "$distfile" ${1+"$@@"} ;; rpm) : ${EXTRACT_OPTS_RPM=} ${RPM2PKG} -d . ${EXTRACT_OPTS_RPM} "$distfile" ${1+"$@@"} ;; jre-bin) : ${EXTRACT_OPTS_BIN=} ${ECHO} yes | "$distfile" ${EXTRACT_OPTS_BIN} >/dev/null ;; gem) ${GEM} "$distfile" ;; 7z) ${P7ZA} "$distfile" ;; zst) : ${EXTRACT_OPTS_ZSTD=} ${ZSTD} -d ${EXTRACT_OPTS_ZSTD} "$distfile" ${1+"$@@"} ;; none) # By default, copy the distfile over to the current working directory. ${CP} "$distfile" . ;; *) ${ECHO} 1>&2 "$self: archive format not recognized -- $format" exit 1 ;; esac exit 0 @ 1.20 log @Extract .zst distfiles using archivers/zstd. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.19 2019/08/02 11:48:17 nia Exp $ a351 1 ${ECHO} 1>&2 "$self: SCHMONZ: looks like $format is .zst" @ 1.19 log @teach extract about .txz, a weird alias for .tar.xz. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.18 2018/10/23 16:39:29 minskim Exp $ d87 1 d118 1 d207 1 a207 1 *.tar.gz|*.tgz|*-tar.gz|*_tar.gz|*.tar.bz2|*.txz|*.tbz|*.tbz2|*.tar.lz|*.tar.lzma|*.tar.xz|*.tar.Z|*.tar.z|*.tar|*.tar.bz|*.tar.7z|*.crate) d223 1 d351 6 @ 1.18 log @lang/rust: Extract .cargo without making a copy in ${WRKDIR} @ text @d3 1 a3 1 # $NetBSD: extract,v 1.17 2018/08/22 20:48:37 maya Exp $ d183 1 a183 1 *.xz) _cformat=xz ;; d205 1 a205 1 *.tar.gz|*.tgz|*-tar.gz|*_tar.gz|*.tar.bz2|*.tbz|*.tbz2|*.tar.lz|*.tar.lzma|*.tar.xz|*.tar.Z|*.tar.z|*.tar|*.tar.bz|*.tar.7z|*.crate) @ 1.17 log @Remove clauses 3,4 from TNF-only copyright blocks. This is based on the decision The NetBSD Foundation made in 2008 to do so, which was already applied to src. This change has been applied to code which is likely not in other repositories. ok board@@, reviewed by riastradh@@ @ text @d3 1 a3 1 # $NetBSD: extract,v 1.16 2013/11/16 07:45:26 shattered Exp $ d178 1 a178 1 *.gz|*.tgz|*.z) _cformat=gzip ;; d205 1 a205 1 *.tar.gz|*.tgz|*-tar.gz|*_tar.gz|*.tar.bz2|*.tbz|*.tbz2|*.tar.lz|*.tar.lzma|*.tar.xz|*.tar.Z|*.tar.z|*.tar|*.tar.bz|*.tar.7z) @ 1.16 log @Decompress .lz files with lzip. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.15 2013/02/28 18:26:22 jperkin Exp $ a18 7 # 3. All advertising materials mentioning features or use of this software # must display the following acknowledgement: # This product includes software developed by the NetBSD # Foundation, Inc. and its contributors. # 4. Neither the name of The NetBSD Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. @ 1.15 log @Add support for *.sh as jre-bin files. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.14 2012/10/06 22:24:45 ryoon Exp $ d111 1 d188 1 d203 1 d212 1 a212 1 *.tar.gz|*.tgz|*-tar.gz|*_tar.gz|*.tar.bz2|*.tbz|*.tbz2|*.tar.lzma|*.tar.xz|*.tar.Z|*.tar.z|*.tar|*.tar.bz|*.tar.7z) @ 1.14 log @Add .tar.7z support. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.13 2012/10/01 10:45:16 ryoon Exp $ d222 1 a222 1 *.bin) _format=jre-bin ;; @ 1.13 log @Add 7z archive distfile support. Fix PR pkg/42967 @ text @d3 1 a3 1 # $NetBSD: extract,v 1.12 2010/12/22 09:33:30 tron Exp $ d122 1 d185 1 d199 1 d209 1 a209 1 *.tar.gz|*.tgz|*-tar.gz|*_tar.gz|*.tar.bz2|*.tbz|*.tbz2|*.tar.lzma|*.tar.xz|*.tar.Z|*.tar.z|*.tar|*.tar.bz) @ 1.12 log @Use "xzcat" instead of "lzcat" to handle ".lzma" files as the former is bundled with NetBSD-current. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.11 2010/01/16 17:08:34 wiz Exp $ d121 1 d221 1 d345 4 @ 1.11 log @Allow a minimum of 64MB when extract lz files. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.10 2009/08/25 11:56:35 wiz Exp $ d197 1 a197 1 lzma) decompress_cat="${LZCAT} --memory=64Mi" ;; @ 1.10 log @Change default for zip extraction to leave files as they are. Previously, zip extraction by default converted to lower case. Fix some packages that need it and remove -L from some packages that manually set it. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.9 2009/07/08 13:27:52 minskim Exp $ d197 1 a197 1 lzma) decompress_cat="${LZCAT}" ;; @ 1.9 log @Uncompress .xz using xzcat. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.8 2008/11/15 20:25:34 minskim Exp $ d301 1 a301 1 : ${EXTRACT_OPTS_ZIP=-Laqo} @ 1.8 log @Decompress .lzma files with lzcat. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.7 2007/07/31 17:42:40 jlam Exp $ d185 1 d198 1 d205 1 a205 1 *.tar.gz|*.tgz|*-tar.gz|*_tar.gz|*.tar.bz2|*.tbz|*.tbz2|*.tar.lzma|*.tar.Z|*.tar.z|*.tar|*.tar.bz) @ 1.7 log @Teach the extract module to extract RPMs with rpm2pkg. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.6 2006/10/18 19:18:12 ben Exp $ d184 1 d196 1 d203 1 a203 1 *.tar.gz|*.tgz|*-tar.gz|*_tar.gz|*.tar.bz2|*.tbz|*.tbz2|*.tar.Z|*.tar.z|*.tar|*.tar.bz) @ 1.6 log @Add cformat= to avoid an error and exit on the undefined variable. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.5 2006/10/18 16:17:42 ben Exp $ d91 1 d114 1 d213 1 d325 5 @ 1.5 log @Change from jlam that adds the ability to override the decompressor used by extract. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.4 2006/10/15 01:56:06 minskim Exp $ d134 1 @ 1.4 log @Teach how to unpack .gem files. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.3 2006/09/13 11:10:36 joerg Exp $ d60 4 d125 1 a125 1 ${ECHO} 1>&2 "usage: $self [-d dir] [-f format] [-t tarprog] [-X excludefile | -x] distfile [file ...]" d138 1 d177 1 a177 1 # Set the command to decompress the file and write the contents to stdout. d179 15 a193 4 *.gz|*.tgz|*.z) decompress_cat="${GZCAT}" ;; *.bz2|*.tbz|*.tbz2|*.bz) decompress_cat="${BZCAT}" ;; *.Z) decompress_cat="${GZCAT}" ;; *) decompress_cat="${CAT}" ;; @ 1.3 log @Add support for cpio archives. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.2 2006/09/03 16:36:37 schwarz Exp $ d103 1 d195 1 d310 4 @ 1.2 log @ use gzip -cd instead of gzcat, the latter not being available on all systems, notably not being part of pkgsrc. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.1 2006/06/06 03:05:48 jlam Exp $ d183 2 d259 11 @ 1.1 log @Refactor "fetch" and "extract" code into correspondingly named subdirectories of pkgsrc/mk. Move the following files around for locality: pkgsrc/mk/scripts/extract -> pkgsrc/mk/extract/extract pkgsrc/mk/bsd.sites.mk -> pkgsrc/mk/fetch/sites.mk Also get rid of the recursive make for the "fetch" and "extract" targets. This basically merges the "fetch" and "extract" phases into the "patch" phase. There is still much more work to do to simplify the fetch code, but this is a good start. @ text @d3 1 a3 1 # $NetBSD: extract,v 1.21 2006/05/30 23:51:38 wiz Exp $ d103 1 a103 1 : ${GZCAT:=gzcat} @