about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-09-04T15·38+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-09-04T15·38+0000
commit9441550acb34cf35f6cd3859d3672adca79551d9 (patch)
tree9a6cc5ec0f3011841923a93d50035ae7ddbdf9d1 /scripts
parent7b20c0ed4b3ef518c1f55bfbb2ece932539f35ea (diff)
* nix-push / generate-patches: bzip the manifest.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nix-push.in4
-rw-r--r--scripts/readmanifest.pm.in8
2 files changed, 12 insertions, 0 deletions
diff --git a/scripts/nix-push.in b/scripts/nix-push.in
index 992622fbb4ca..dd00841d7d04 100644
--- a/scripts/nix-push.in
+++ b/scripts/nix-push.in
@@ -264,8 +264,12 @@ foreach my $narArchive (@narArchives) {
 print STDERR "uploading manifest...\n";
 if ($localCopy) {
     copyFile $manifest, $localManifestFile;
+    copyFile "$manifest.bz2", "$localManifestFile.bz2";
 } else {
     system("$curl --show-error --upload-file " .
            "'$manifest' '$manifestPutURL' > /dev/null") == 0 or
            die "curl failed on $manifest: $?";
+    system("$curl --show-error --upload-file " .
+           "'$manifest'.bz2 '$manifestPutURL'.bz2 > /dev/null") == 0 or
+           die "curl failed on $manifest: $?";
 }
diff --git a/scripts/readmanifest.pm.in b/scripts/readmanifest.pm.in
index 1d44444700ee..b41e72dfba14 100644
--- a/scripts/readmanifest.pm.in
+++ b/scripts/readmanifest.pm.in
@@ -222,6 +222,14 @@ sub writeManifest
 
     rename("$manifest.tmp", $manifest)
         or die "cannot rename $manifest.tmp: $!";
+
+
+    # Create a bzipped manifest.
+    system("@bzip2@ < $manifest > $manifest.bz2.tmp") == 0
+        or die "cannot compress manifest";
+
+    rename("$manifest.bz2.tmp", "$manifest.bz2")
+        or die "cannot rename $manifest.bz2.tmp: $!";
 }