]> granicus.if.org Git - postgresql/commitdiff
Fix msvc install script to properly install NLS files when built with
authorMagnus Hagander <magnus@hagander.net>
Thu, 7 Feb 2008 13:49:00 +0000 (13:49 +0000)
committerMagnus Hagander <magnus@hagander.net>
Thu, 7 Feb 2008 13:49:00 +0000 (13:49 +0000)
gettext.

src/tools/msvc/Install.pm

index 546ce9ba35066549419fb2b751ef4fc41321134e..f052d3bc3c4b1bcfb25c7d220d63fe31c91d7b93 100644 (file)
@@ -3,7 +3,7 @@ package Install;
 #
 # Package that provides 'make install' functionality for msvc builds
 #
-# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.26 2007/12/03 15:42:58 mha Exp $
+# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.27 2008/02/07 13:49:00 mha Exp $
 #
 use strict;
 use warnings;
@@ -456,27 +456,27 @@ sub GenerateNLSFiles
     print "Installing NLS files...";
     EnsureDirectories($target, "share/locale");
        my @flist;
-       File::Find::find({wanted => 
-                                                 sub { /^nls\.mk\z/s && 
-                                                                       !                                                                       push(@flist, $File::Find::name);        
-                                                       } 
+       File::Find::find({wanted =>
+                                                 sub { /^nls\.mk\z/s &&
+                                                                       !push(@flist, $File::Find::name);
+                                                       }
                                  }, "src");
     foreach (@flist)
     {
         s/nls.mk/po/;
         my $dir = $_;
-        next unless ($dir =~ /([^\\]+)\\po$/);
+        next unless ($dir =~ /([^\/]+)\/po$/);
         my $prgm = $1;
         $prgm = 'postgres' if ($prgm eq 'backend');
         foreach (glob("$dir/*.po"))
         {
             my $lang;
-            next unless /^(.*)\.po/;
+            next unless /([^\/]+)\.po/;
             $lang = $1;
 
             EnsureDirectories($target, "share/locale/$lang", "share/locale/$lang/LC_MESSAGES");
             system(
-"$nlspath\\bin\\msgfmt -o $target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm.mo $dir\\$_"
+"$nlspath\\bin\\msgfmt -o $target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm.mo $_"
               )
               && croak("Could not run msgfmt on $dir\\$_");
             print ".";