mirror of
https://github.com/NixOS/nix
synced 2025-07-07 06:01:48 +02:00
Use proper quotes everywhere
This commit is contained in:
parent
373fad75e1
commit
11849a320e
54 changed files with 548 additions and 543 deletions
|
@ -13,7 +13,7 @@ umask 0022;
|
|||
|
||||
# Create the manifests directory if it doesn't exist.
|
||||
if (! -e $manifestDir) {
|
||||
mkdir $manifestDir, 0755 or die "cannot create directory `$manifestDir'";
|
||||
mkdir $manifestDir, 0755 or die "cannot create directory ‘$manifestDir’";
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@ if (! -e $manifestDir) {
|
|||
my $gcRootsDir = "$Nix::Config::stateDir/gcroots";
|
||||
my $manifestDirLink = "$gcRootsDir/manifests";
|
||||
if (! -l $manifestDirLink) {
|
||||
symlink($manifestDir, $manifestDirLink) or die "cannot create symlink `$manifestDirLink'";
|
||||
symlink($manifestDir, $manifestDirLink) or die "cannot create symlink ‘$manifestDirLink’";
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,7 +32,7 @@ sub downloadFile {
|
|||
$ENV{"PRINT_PATH"} = 1;
|
||||
$ENV{"QUIET"} = 1;
|
||||
my ($dummy, $path) = `$Nix::Config::binDir/nix-prefetch-url '$url'`;
|
||||
die "cannot fetch `$url'" if $? != 0;
|
||||
die "cannot fetch ‘$url’" if $? != 0;
|
||||
die "nix-prefetch-url did not return a path" unless defined $path;
|
||||
chomp $path;
|
||||
return $path;
|
||||
|
@ -49,13 +49,13 @@ sub processURL {
|
|||
|
||||
# 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";
|
||||
print "fetching list of Nix archives at ‘$url.bz2’...\n";
|
||||
$manifest = downloadFile "$url.bz2";
|
||||
}
|
||||
|
||||
# Otherwise, just get the uncompressed manifest.
|
||||
else {
|
||||
print "fetching list of Nix archives at `$url'...\n";
|
||||
print "fetching list of Nix archives at ‘$url’...\n";
|
||||
$manifest = downloadFile $url;
|
||||
}
|
||||
|
||||
|
@ -65,11 +65,11 @@ sub processURL {
|
|||
}
|
||||
|
||||
my $hash = `$Nix::Config::binDir/nix-hash --flat '$manifest'`
|
||||
or die "cannot hash `$manifest'";
|
||||
or die "cannot hash ‘$manifest’";
|
||||
chomp $hash;
|
||||
|
||||
my $urlFile = "$manifestDir/$baseName-$hash.url";
|
||||
open URL, ">$urlFile" or die "cannot create `$urlFile'";
|
||||
open URL, ">$urlFile" or die "cannot create ‘$urlFile’";
|
||||
print URL $origUrl;
|
||||
close URL;
|
||||
|
||||
|
@ -78,7 +78,7 @@ sub processURL {
|
|||
unlink $finalPath if -e $finalPath;
|
||||
|
||||
symlink("$manifest", "$finalPath")
|
||||
or die "cannot link `$finalPath to `$manifest'";
|
||||
or die "cannot link ‘$finalPath’ to ‘$manifest’";
|
||||
|
||||
deleteOldManifests($origUrl, $urlFile);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue