From 96b3f64f741936ed8430d6ff740eebbb7b6796a6 Mon Sep 17 00:00:00 2001 From: "Tom G. Christensen" Date: Wed, 23 Mar 2005 09:40:55 +0000 Subject: [PATCH] Add support for unpacking zip archives --- buildpkg.functions | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buildpkg.functions b/buildpkg.functions index 91dc419..10ff9dd 100644 --- a/buildpkg.functions +++ b/buildpkg.functions @@ -66,6 +66,7 @@ LN=/usr/bin/ln GINSTALL=/usr/local/bin/install # BSD compatible install - usually GNU install COMPRESS=/usr/bsd/compress SHA1SUM=/usr/local/bin/sha1sum +UNZIP=/usr/local/bin/unzip # Groff stuff for manpages NROFF=/usr/local/bin/nroff @@ -256,7 +257,7 @@ patch() # unpack(): Unpack source # params: $1 = source number (arrayindex) # It will detect filetype and unpack -# .tar, .tgz, .gz, .bz2 and .Z supported +# .tar, .tgz, .gz, .bz2, zip and .Z supported unpack() { local snum=$1 @@ -279,6 +280,7 @@ unpack() 'bz2') $BZIP2 -dc ${source[$snum]} | $TAR -xf -;; 'Z') $GZIP -dc ${source[$snum]} | $TAR -xf -;; 'tgz') $GZIP -dc ${source[$snum]} | $TAR -xf -;; + 'zip') $UNZIP -q ${source[$snum]};; *) error $E_BAD_COMPRESS unpack esac if [ $? -ne 0 ]; then