about summary refs log tree commit diff
path: root/scripts/nix-pull
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-10T15·24+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-10T15·24+0000
commit8511571f653fcfbb724061dac330c544b6048722 (patch)
treece40ac11f099aa507915ea2ae404ab96cf3af890 /scripts/nix-pull
parent1d1c3691d2fdf5aad0baceadd8596f23c1e0e1fa (diff)
* Performance enhancement.
Diffstat (limited to 'scripts/nix-pull')
-rw-r--r--scripts/nix-pull10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/nix-pull b/scripts/nix-pull
index 59773a2bad17..a15af6302022 100644
--- a/scripts/nix-pull
+++ b/scripts/nix-pull
@@ -6,6 +6,8 @@ my $tmpfile = "$prefix/var/nix/pull.tmp";
 
 my $conffile = "$etcdir/prebuilts.conf";
 
+my @subs;
+
 open CONFFILE, "<$conffile";
 
 while (<CONFFILE>) {
@@ -55,8 +57,9 @@ while (<CONFFILE>) {
 	    chomp $nhash;
 	    die unless $nhash =~ /^([0-9a-z]{32})$/;
 
-	    system "nix --substitute $hash $nhash";
-	    if ($?) { die "`nix --substitute' failed"; }
+	    push @subs, $hash;
+	    push @subs, $nhash;
+
 	}
 
 	close INDEX;
@@ -65,3 +68,6 @@ while (<CONFFILE>) {
     }
 
 }
+
+system "nix --substitute @subs";
+if ($?) { die "`nix --substitute' failed"; }