[LON-CAPA-cvs] cvs: doc /install/linux install.pl

raeburn raeburn at source.lon-capa.org
Wed Feb 27 14:48:53 EST 2013


raeburn		Wed Feb 27 19:48:53 2013 EDT

  Modified files:              
    /doc/install/linux	install.pl 
  Log:
  - Improved locale checking for Debian.
  - Change in suggested commands to set locale LANG to en_US.UTF-8 in Debian
    and Ubuntu if LANG currently set to something else. 
  
  
Index: doc/install/linux/install.pl
diff -u doc/install/linux/install.pl:1.24 doc/install/linux/install.pl:1.25
--- doc/install/linux/install.pl:1.24	Sun Jan  6 23:04:07 2013
+++ doc/install/linux/install.pl	Wed Feb 27 19:48:53 2013
@@ -72,7 +72,7 @@
           &mt('Stopping execution.')."\n";
     exit;
 } else {
-    print LOG '$Id: install.pl,v 1.24 2013/01/06 23:04:07 raeburn Exp $'."\n";
+    print LOG '$Id: install.pl,v 1.25 2013/02/27 19:48:53 raeburn Exp $'."\n";
 }
 
 #
@@ -339,13 +339,15 @@
     my @data = <$fh>;
     chomp(@data);
     foreach my $item (@data) {
-        if ($item =~ /^\Q$langvar\E=\"([^\"]*)\"/) {
+        if ($item =~ /^\Q$langvar\E=\"?([^\"]*)\"?/) {
             my $default = $1;
             if ($default ne 'en_US.UTF-8') {
                 if ($distro =~ /^debian/) {
-                    $command = 'dpkg-reconfigure locales';
+                    $command = 'locale-gen en_US.UTF-8'."\n".
+                               'update-locale LANG=en_US.UTF-8';
                 } elsif ($distro =~ /^ubuntu/) {
-                    $command = 'sudo set-language-env -E'; 
+                    $command = 'sudo locale-gen en_US.UTF-8'."\n".
+                               'sudo update-locale LANG=en_US.UTF-8';
                 } elsif ($distro =~ /^(suse|sles)/) {
                     $command = 'yast language'; 
                 } else {




More information about the LON-CAPA-cvs mailing list