about summary refs log tree commit diff
path: root/scripts/nix-channel.in
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-20T15·00+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-20T16·03+0200
commit11849a320e4f522b97fcdf09ff0940496880475b (patch)
tree13548f1c1bb2e01590b31d66d9bb8f46534bc99f /scripts/nix-channel.in
parent373fad75e19a2f24db512621b8cedb627d03d49d (diff)
Use proper quotes everywhere
Diffstat (limited to 'scripts/nix-channel.in')
-rwxr-xr-xscripts/nix-channel.in28
1 files changed, 14 insertions, 14 deletions
diff --git a/scripts/nix-channel.in b/scripts/nix-channel.in
index 62292a87fd73..407f27490410 100755
--- a/scripts/nix-channel.in
+++ b/scripts/nix-channel.in
@@ -32,7 +32,7 @@ my %channels;
 # Reads the list of channels.
 sub readChannels {
     return if (!-f $channelsList);
-    open CHANNELS, "<$channelsList" or die "cannot open `$channelsList': $!";
+    open CHANNELS, "<$channelsList" or die "cannot open ‘$channelsList’: $!";
     while (<CHANNELS>) {
         chomp;
         next if /^\s*\#/;
@@ -47,7 +47,7 @@ sub readChannels {
 
 # Writes the list of channels.
 sub writeChannels {
-    open CHANNELS, ">$channelsList" or die "cannot open `$channelsList': $!";
+    open CHANNELS, ">$channelsList" or die "cannot open ‘$channelsList’: $!";
     foreach my $name (keys %channels) {
         print CHANNELS "$channels{$name} $name\n";
     }
@@ -74,7 +74,7 @@ sub removeChannel {
     writeChannels;
 
     system("$Nix::Config::binDir/nix-env --profile '$profile' -e '$name'") == 0
-        or die "cannot remove channel `$name'\n";
+        or die "cannot remove channel ‘$name’\n";
 }
 
 
@@ -97,7 +97,7 @@ sub update {
         # consistency if the redirection is changed between
         # downloading the manifest and the tarball.
         my $headers = `$Nix::Config::curl --silent --head '$url'`;
-        die "$0: unable to check `$url'\n" if $? != 0;
+        die "$0: unable to check ‘$url’\n" if $? != 0;
         $headers =~ s/\r//g;
         $url = $1 if $headers =~ /^Location:\s*(.*)\s*$/m;
 
@@ -115,19 +115,19 @@ sub update {
         if ($getManifest) {
             # No binary cache, so pull the channel manifest.
             mkdir $manifestDir, 0755 unless -e $manifestDir;
-            die "$0: you do not have write permission to `$manifestDir'!\n" unless -W $manifestDir;
+            die "$0: you do not have write permission to ‘$manifestDir’!\n" unless -W $manifestDir;
             $ENV{'NIX_ORIG_URL'} = $origUrl;
             system("$Nix::Config::binDir/nix-pull", "--skip-wrong-store", "$url/MANIFEST") == 0
-                or die "cannot pull manifest from `$url'\n";
+                or die "cannot pull manifest from ‘$url’\n";
         }
 
         # Download the channel tarball.
         my $fullURL = "$url/nixexprs.tar.xz";
         system("$Nix::Config::curl --fail --silent --head '$fullURL' > /dev/null") == 0 or
             $fullURL = "$url/nixexprs.tar.bz2";
-        print STDERR "downloading Nix expressions from `$fullURL'...\n";
+        print STDERR "downloading Nix expressions from ‘$fullURL’...\n";
         my ($hash, $path) = `PRINT_PATH=1 QUIET=1 $Nix::Config::binDir/nix-prefetch-url '$fullURL'`;
-        die "cannot fetch `$fullURL'\n" if $? != 0;
+        die "cannot fetch ‘$fullURL’\n" if $? != 0;
         chomp $path;
 
         # If the URL contains a version number, append it to the name
@@ -148,10 +148,10 @@ sub update {
 
     # Make the channels appear in nix-env.
     unlink $nixDefExpr if -l $nixDefExpr; # old-skool ~/.nix-defexpr
-    mkdir $nixDefExpr or die "cannot create directory `$nixDefExpr'" if !-e $nixDefExpr;
+    mkdir $nixDefExpr or die "cannot create directory ‘$nixDefExpr’" if !-e $nixDefExpr;
     my $channelLink = "$nixDefExpr/channels";
     unlink $channelLink; # !!! not atomic
-    symlink($profile, $channelLink) or die "cannot symlink `$channelLink' to `$profile'";
+    symlink($profile, $channelLink) or die "cannot symlink ‘$channelLink’ to ‘$profile’";
 }
 
 
@@ -162,7 +162,7 @@ while (scalar @ARGV) {
     my $arg = shift @ARGV;
 
     if ($arg eq "--add") {
-        die "$0: `--add' requires one or two arguments\n" if scalar @ARGV < 1 || scalar @ARGV > 2;
+        die "$0: ‘--add’ requires one or two arguments\n" if scalar @ARGV < 1 || scalar @ARGV > 2;
         my $url = shift @ARGV;
         my $name = shift @ARGV;
         unless (defined $name) {
@@ -175,13 +175,13 @@ while (scalar @ARGV) {
     }
 
     if ($arg eq "--remove") {
-        die "$0: `--remove' requires one argument\n" if scalar @ARGV != 1;
+        die "$0: ‘--remove’ requires one argument\n" if scalar @ARGV != 1;
         removeChannel(shift @ARGV);
         last;
     }
 
     if ($arg eq "--list") {
-        die "$0: `--list' requires one argument\n" if scalar @ARGV != 0;
+        die "$0: ‘--list’ requires one argument\n" if scalar @ARGV != 0;
         readChannels;
         foreach my $name (keys %channels) {
             print "$name $channels{$name}\n";
@@ -204,6 +204,6 @@ while (scalar @ARGV) {
     }
 
     else {
-        die "unknown argument `$arg'; try `--help'\n";
+        die "unknown argument ‘$arg’; try ‘--help’\n";
     }
 }