diff options
author | Gergely Risko <gergely@risko.hu> | 2013-05-14 15:10:14 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-07-12 11:29:37 +0200 |
commit | 25a00cae5bf702b9e844b05923a9c59de9df6788 (patch) | |
tree | 161dce3706f6a840701aafb036ed2e3daa651459 /corepkgs/unpack-channel.nix | |
parent | 620d57f036be5a8b8fa04ee1a2aa2329e652e0f0 (diff) |
Add gzip support for channel unpacking
Diffstat (limited to 'corepkgs/unpack-channel.nix')
-rw-r--r-- | corepkgs/unpack-channel.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/corepkgs/unpack-channel.nix b/corepkgs/unpack-channel.nix index 5c2a61e66..b309fc41e 100644 --- a/corepkgs/unpack-channel.nix +++ b/corepkgs/unpack-channel.nix @@ -6,9 +6,12 @@ let '' mkdir $out cd $out - pat="\.xz\$" - if [[ "$src" =~ $pat ]]; then + xzpat="\.xz\$" + gzpat="\.gz\$" + if [[ "$src" =~ $xzpat ]]; then ${xz} -d < $src | ${tar} xf - ${tarFlags} + else if [[ "$src" =~ $gzpat ]]; then + ${gzip} -d < $src | ${tar} xf - ${tarFlags} else ${bzip2} -d < $src | ${tar} xf - ${tarFlags} fi |