about summary refs log tree commit diff
path: root/scripts/nix-pull.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-08-15T10·13+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-08-15T10·13+0000
commite374dbf89b0ba9a4f5835ef9ac30eda6df1dce6a (patch)
treeab3712823c18dcb08fd4506716b4a102b7cfdc8b /scripts/nix-pull.in
parent01e30360d46ce940d8b83f4ff7a71e8464c1422b (diff)
* A script `nix-prefetch-url' to fetch a URL, place it in the Nix
  store, and print its hash.

Diffstat (limited to 'scripts/nix-pull.in')
-rw-r--r--scripts/nix-pull.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in
index d7b0523d6c95..a3d23ea167af 100644
--- a/scripts/nix-pull.in
+++ b/scripts/nix-pull.in
@@ -1,5 +1,6 @@
 #! /usr/bin/perl -w
 
+use strict;
 use IPC::Open2;
 
 my $tmpfile = "@localstatedir@/nix/pull.tmp";
@@ -85,7 +86,7 @@ $fullexpr .= "]";
 
 # Instantiate Nix expressions from the Fix expressions we created above.
 print STDERR "running fix...\n";
-$pid = open2(\*READ, \*WRITE, "fix -") or die "cannot run fix";
+my $pid = open2(\*READ, \*WRITE, "fix -") or die "cannot run fix";
 
 print WRITE $fullexpr;
 close WRITE;
@@ -93,9 +94,9 @@ my $i = 0;
 while (<READ>) {
     chomp;
     die unless /^([0-9a-z]{32})$/;
-    $nid = $1;
+    my $nid = $1;
     die unless ($i < scalar @ids);
-    $id = $ids[$i++];
+    my $id = $ids[$i++];
     push @subs, $id;
     push @subs, $nid;
 }