From 8511571f653fcfbb724061dac330c544b6048722 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 10 Jul 2003 15:24:50 +0000 Subject: * Performance enhancement. --- scripts/nix-pull | 10 ++++++++-- 1 file 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 () { @@ -55,8 +57,9 @@ while () { 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 () { } } + +system "nix --substitute @subs"; +if ($?) { die "`nix --substitute' failed"; } -- cgit 1.4.1