mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
Add gzip support for channel unpacking
This commit is contained in:
parent
620d57f036
commit
25a00cae5b
4 changed files with 8 additions and 3 deletions
|
@ -183,10 +183,10 @@ NEED_PROG(perl, perl)
|
||||||
NEED_PROG(sed, sed)
|
NEED_PROG(sed, sed)
|
||||||
NEED_PROG(tar, tar)
|
NEED_PROG(tar, tar)
|
||||||
NEED_PROG(bzip2, bzip2)
|
NEED_PROG(bzip2, bzip2)
|
||||||
|
NEED_PROG(gzip, gzip)
|
||||||
NEED_PROG(xz, xz)
|
NEED_PROG(xz, xz)
|
||||||
AC_PATH_PROG(dot, dot)
|
AC_PATH_PROG(dot, dot)
|
||||||
AC_PATH_PROG(dblatex, dblatex)
|
AC_PATH_PROG(dblatex, dblatex)
|
||||||
AC_PATH_PROG(gzip, gzip)
|
|
||||||
AC_PATH_PROG(pv, pv, pv)
|
AC_PATH_PROG(pv, pv, pv)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ in {
|
||||||
shell = "@shell@";
|
shell = "@shell@";
|
||||||
coreutils = "@coreutils@";
|
coreutils = "@coreutils@";
|
||||||
bzip2 = "@bzip2@";
|
bzip2 = "@bzip2@";
|
||||||
|
gzip = "@gzip@";
|
||||||
xz = "@xz@";
|
xz = "@xz@";
|
||||||
tar = "@tar@";
|
tar = "@tar@";
|
||||||
tarFlags = "@tarFlags@";
|
tarFlags = "@tarFlags@";
|
||||||
|
|
|
@ -6,9 +6,12 @@ let
|
||||||
''
|
''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cd $out
|
cd $out
|
||||||
pat="\.xz\$"
|
xzpat="\.xz\$"
|
||||||
if [[ "$src" =~ $pat ]]; then
|
gzpat="\.gz\$"
|
||||||
|
if [[ "$src" =~ $xzpat ]]; then
|
||||||
${xz} -d < $src | ${tar} xf - ${tarFlags}
|
${xz} -d < $src | ${tar} xf - ${tarFlags}
|
||||||
|
else if [[ "$src" =~ $gzpat ]]; then
|
||||||
|
${gzip} -d < $src | ${tar} xf - ${tarFlags}
|
||||||
else
|
else
|
||||||
${bzip2} -d < $src | ${tar} xf - ${tarFlags}
|
${bzip2} -d < $src | ${tar} xf - ${tarFlags}
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -22,6 +22,7 @@ Requires: /usr/bin/perl
|
||||||
Requires: curl
|
Requires: curl
|
||||||
Requires: perl-DBD-SQLite
|
Requires: perl-DBD-SQLite
|
||||||
Requires: bzip2
|
Requires: bzip2
|
||||||
|
Requires: gzip
|
||||||
Requires: xz
|
Requires: xz
|
||||||
BuildRequires: bzip2-devel
|
BuildRequires: bzip2-devel
|
||||||
BuildRequires: sqlite-devel
|
BuildRequires: sqlite-devel
|
||||||
|
|
Loading…
Reference in a new issue