stdenv: Let GNU tar select the decompression method.

svn path=/nixpkgs/branches/stdenv-updates/; revision=18492
This commit is contained in:
Ludovic Courtès 2009-11-20 17:10:00 +00:00
parent be4dfd41be
commit ab61e5b40d

View file

@ -418,15 +418,11 @@ unpackFile() {
header "unpacking source archive $curSrc" 3
case "$curSrc" in
*.tar)
*.tar | *.tar.* | *.tgz | *.tbz2)
# GNU tar can automatically select the decompression method
# (info "(tar) gzip").
tar xvf $curSrc
;;
*.tar.gz | *.tgz | *.tar.Z)
gzip -d < $curSrc | tar xvf -
;;
*.tar.bz2 | *.tbz2)
bzip2 -d < $curSrc | tar xvf -
;;
*.zip)
unzip $curSrc
;;