Author: eelco
Date: Wed Nov 23 15:29:58 2011
New Revision: 30541
URL: https://nixos.org/websvn/nix/?rev=30541&sc=1
Log:
* Add bzip2 and xz support to nix-copy-closure.
Modified:
nix/trunk/doc/manual/nix-copy-closure.xml
nix/trunk/scripts/nix-copy-closure.in
Modified: nix/trunk/doc/manual/nix-copy-closure.xml
==============================================================================
--- nix/trunk/doc/manual/nix-copy-closure.xml Wed Nov 23 15:13:37 2011
(r30540)
+++ nix/trunk/doc/manual/nix-copy-closure.xml Wed Nov 23 15:29:58 2011
(r30541)
@@ -24,6 +24,8 @@
</group>
<arg><option>--sign</option></arg>
<arg><option>--gzip</option></arg>
+ <arg><option>--bzip2</option></arg>
+ <arg><option>--xz</option></arg>
<arg choice='plain'>
<arg><replaceable>user@</replaceable></arg><replaceable>machine</replaceable>
</arg>
@@ -96,10 +98,13 @@
</varlistentry>
- <varlistentry><term><option>--gzip</option></term>
+ <varlistentry><term><option>--gzip</option> / <option>--bzip2</option> /
<option>--xz</option></term>
- <listitem><para>Compress the dump of each path with
- <command>gzip</command> before sending it.</para></listitem>
+ <listitem><para>Compress the dump of each path with respectively
+ <command>gzip</command>, <command>bzip2</command> or
+ <command>xz</command> before sending it. The corresponding
+ decompression program must be installed on the target
+ machine.</para></listitem>
</varlistentry>
Modified: nix/trunk/scripts/nix-copy-closure.in
==============================================================================
--- nix/trunk/scripts/nix-copy-closure.in Wed Nov 23 15:13:37 2011
(r30540)
+++ nix/trunk/scripts/nix-copy-closure.in Wed Nov 23 15:29:58 2011
(r30541)
@@ -8,7 +8,7 @@
if (scalar @ARGV < 1) {
print STDERR <<EOF
-Usage: nix-copy-closure [--from | --to] HOSTNAME [--sign] [--gzip] PATHS...
+Usage: nix-copy-closure [--from | --to] HOSTNAME [--sign] [--gzip] [--bzip2]
[--xz] PATHS...
EOF
;
exit 1;
@@ -43,6 +43,14 @@
$compressor = "gzip";
$decompressor = "gunzip";
}
+ elsif ($arg eq "--bzip2") {
+ $compressor = "bzip2";
+ $decompressor = "bunzip2";
+ }
+ elsif ($arg eq "--xz") {
+ $compressor = "xz";
+ $decompressor = "xz -d";
+ }
elsif ($arg eq "--from") {
$toMode = 0;
}
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits