From e374dbf89b0ba9a4f5835ef9ac30eda6df1dce6a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 15 Aug 2003 10:13:41 +0000 Subject: * A script `nix-prefetch-url' to fetch a URL, place it in the Nix store, and print its hash. --- scripts/nix-pull.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts/nix-pull.in') 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 () { 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; } -- cgit 1.4.1