about summary refs log tree commit diff
path: root/scripts/nix-copy-closure.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-11-23T15·29+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-11-23T15·29+0000
commitd5ac78e0d6f21dc60bd4f4f3990a18dc2bc12c4c (patch)
tree95ae15938ef61e1f702a6176ed02a90d3922d57f /scripts/nix-copy-closure.in
parent5bbd693caedd5d50994938555b3a4b535875347e (diff)
* Add bzip2 and xz support to nix-copy-closure.
Diffstat (limited to 'scripts/nix-copy-closure.in')
-rwxr-xr-xscripts/nix-copy-closure.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/nix-copy-closure.in b/scripts/nix-copy-closure.in
index 2eac56e3f229..9191de59e34b 100755
--- a/scripts/nix-copy-closure.in
+++ b/scripts/nix-copy-closure.in
@@ -8,7 +8,7 @@ use Nix::CopyClosure;
 
 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 @@ while (@ARGV) {
         $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;
     }