diff options
author | Gergely Risko <gergely@risko.hu> | 2013-05-14T13·10+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-07-12T09·29+0200 |
commit | 25a00cae5bf702b9e844b05923a9c59de9df6788 (patch) | |
tree | 161dce3706f6a840701aafb036ed2e3daa651459 | |
parent | 620d57f036be5a8b8fa04ee1a2aa2329e652e0f0 (diff) |
Add gzip support for channel unpacking
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | corepkgs/config.nix.in | 1 | ||||
-rw-r--r-- | corepkgs/unpack-channel.nix | 7 | ||||
-rw-r--r-- | nix.spec.in | 1 |
4 files changed, 8 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 54b8dff08bb2..e963fbc9f5d0 100644 --- a/configure.ac +++ b/configure.ac @@ -183,10 +183,10 @@ NEED_PROG(perl, perl) NEED_PROG(sed, sed) NEED_PROG(tar, tar) NEED_PROG(bzip2, bzip2) +NEED_PROG(gzip, gzip) NEED_PROG(xz, xz) AC_PATH_PROG(dot, dot) AC_PATH_PROG(dblatex, dblatex) -AC_PATH_PROG(gzip, gzip) AC_PATH_PROG(pv, pv, pv) diff --git a/corepkgs/config.nix.in b/corepkgs/config.nix.in index 6f6ec6de1a30..3819dc96c164 100644 --- a/corepkgs/config.nix.in +++ b/corepkgs/config.nix.in @@ -7,6 +7,7 @@ in { shell = "@shell@"; coreutils = "@coreutils@"; bzip2 = "@bzip2@"; + gzip = "@gzip@"; xz = "@xz@"; tar = "@tar@"; tarFlags = "@tarFlags@"; diff --git a/corepkgs/unpack-channel.nix b/corepkgs/unpack-channel.nix index 5c2a61e66946..b309fc41ec01 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 diff --git a/nix.spec.in b/nix.spec.in index a6a0b370da33..d09140562672 100644 --- a/nix.spec.in +++ b/nix.spec.in @@ -22,6 +22,7 @@ Requires: /usr/bin/perl Requires: curl Requires: perl-DBD-SQLite Requires: bzip2 +Requires: gzip Requires: xz BuildRequires: bzip2-devel BuildRequires: sqlite-devel |