diff options
Diffstat (limited to 'scripts/nix-pull.in')
-rwxr-xr-x | scripts/nix-pull.in | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in index 8d5db2f57c68..e59a38eec79f 100755 --- a/scripts/nix-pull.in +++ b/scripts/nix-pull.in @@ -49,6 +49,8 @@ sub processURL { my $manifest; + my $origUrl = $ENV{'NIX_ORIG_URL'} || $url; + # First see if a bzipped manifest is available. if (system("$Nix::Config::curl --fail --silent --location --head '$url'.bz2 > /dev/null") == 0) { print "fetching list of Nix archives at `$url.bz2'...\n"; @@ -72,7 +74,7 @@ sub processURL { my $urlFile = "$manifestDir/$baseName-$hash.url"; open URL, ">$urlFile" or die "cannot create `$urlFile'"; - print URL ($ENV{'NIX_ORIG_URL'} || $url); + print URL $origUrl; close URL; my $finalPath = "$manifestDir/$baseName-$hash.nixmanifest"; @@ -89,7 +91,7 @@ sub processURL { my $url2 = <URL>; chomp $url2; close URL; - next unless $url eq $url2; + next unless $origUrl eq $url2; my $base = $urlFile2; $base =~ s/.url$//; unlink "${base}.url"; unlink "${base}.nixmanifest"; |