Since bsdtar can detect the type of file it's extracting, simplify

handling of compressed tarballs and zip files.

Approved by:	maho (maintainer)
This commit is contained in:
Brooks Davis 2008-02-27 03:24:46 +00:00
parent 209baad7af
commit 4326f253fb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=207975
2 changed files with 26 additions and 13 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= octave PORTNAME= octave
PORTVERSION= 3.0.0 PORTVERSION= 3.0.0
PORTREVISION= 2 PORTREVISION= 3
CATEGORIES= math CATEGORIES= math
MASTER_SITES= ftp://ftp.octave.org/pub/octave/ \ MASTER_SITES= ftp://ftp.octave.org/pub/octave/ \
ftp://ftp.u-aizu.ac.jp/pub/SciEng/numanal/Octave/bleeding-edge/ ftp://ftp.u-aizu.ac.jp/pub/SciEng/numanal/Octave/bleeding-edge/

View file

@ -1,19 +1,32 @@
--- scripts/miscellaneous/unpack.m.orig 2007-10-13 06:27:23.000000000 +0900
+++ scripts/miscellaneous/unpack.m 2008-02-27 11:17:04.000000000 +0900 $FreeBSD$
@@ -124,12 +124,12 @@
--- scripts/miscellaneous/unpack.m.orig
+++ scripts/miscellaneous/unpack.m
@@ -124,19 +124,13 @@
commandlist.tar = {"tar -x -v -f \"%s\"", ... commandlist.tar = {"tar -x -v -f \"%s\"", ...
"tar -x -f \"%s\"", ... "tar -x -f \"%s\"", ...
@__parse_tar__, false}; @__parse_tar__, false};
- commandlist.targz = {"gzip -d -c \"%s\" | tar -x -v", ... - commandlist.targz = {"gzip -d -c \"%s\" | tar -x -v", ...
- "gzip -d -c \"%s\" | tar -x", ... - "gzip -d -c \"%s\" | tar -x", ...
+ commandlist.targz = {"gzip -d -c \"%s\" | tar -x -v -f - ", ... - @__parse_tar__, false};
+ "gzip -d -c \"%s\" | tar -x -f - ", ... - commandlist.tgz = commandlist.targz;
@__parse_tar__, false};
commandlist.tgz = commandlist.targz;
- commandlist.tarbz2 = {"bzip2 -d -c \"%s\" | tar -x -v", ... - commandlist.tarbz2 = {"bzip2 -d -c \"%s\" | tar -x -v", ...
- "bzip2 -d -c \"%s\" | tar -x", ... - "bzip2 -d -c \"%s\" | tar -x", ...
+ commandlist.tarbz2 = {"bzip2 -d -c \"%s\" | tar -x -v -f - ", ... - @__parse_tar__, false};
+ "bzip2 -d -c \"%s\" | tar -x -f - ", ... - commandlist.tarbz = commandlist.tarbz2;
@__parse_tar__, false}; - commandlist.tbz2 = commandlist.tarbz2;
commandlist.tarbz = commandlist.tarbz2; - commandlist.tbz = commandlist.tarbz2;
commandlist.tbz2 = commandlist.tarbz2; - commandlist.zip = {"unzip \"%s\"", ...
- "unzip -q \"%s\"", ...
- @__parse_zip__, false};
+ commandlist.targz = commandlist.tar;
+ commandlist.tgz = commandlist.tar;
+ commandlist.tarbz2 = commandlist.tar;
+ commandlist.tarbz = commandlist.tar;
+ commandlist.tbz2 = commandlist.tar;
+ commandlist.tbz = commandlist.tar;
+ commandlist.zip = commandlist.tar;
endif
nodotext = ext(! ismember (ext, "."));