[Libreoffice-commits] .: l10ntools/scripts

Petr Mladek pmladek at kemper.freedesktop.org
Thu Mar 31 11:14:30 PDT 2011


 l10ntools/scripts/localize.pl |   18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

New commits:
commit e29b73f64c3d5d4cf42033ec139db00d192760f7
Author: Tor Lillqvist <tml at novell.com>
Date:   Thu Mar 31 20:12:42 2011 +0200

    localize-pl-cygwin-paths.diff: cygwin paths handling in localize.pl
    
    Fixes localize.pl so that it doesn't pass Cygwin pathnames to the
    non-Cygwin programs it runs.

diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl
index fde165d..b4a2b24 100755
--- a/l10ntools/scripts/localize.pl
+++ b/l10ntools/scripts/localize.pl
@@ -307,8 +307,9 @@ sub merge_gsicheck{
     $command .= "$ENV{SOLARVER}/$ENV{INPATH}/bin/gsicheck";
 
     my $errfile = $sdffile.".err";
-    $command .= " -k -c -wcf $tmpfile -wef $errfile -l \"\" $sdffile";
+    $command .= " -k -c -wcf $tmpfile -wef ".fix_cygwin_path($errfile)." -l \"\" ".fix_cygwin_path($sdffile);
     #my $rc = system( $command );
+    if ($bVerbose) { print STDOUT "localize.pl running $command\n"; }
     my $output = `$command`;
     my $rc = $? << 8;
     if ( $output ne "" ){
@@ -407,7 +408,7 @@ sub collectfiles{
         # if ( -x $command ){
         if( $command ){
             if( !$bVerbose  ){ $args .= " "; }
-            $args .= " -e -f $localizeSDF -l ";
+            $args .= " -e -f ".fix_cygwin_path($localizeSDF)." -l ";
             my $bFlag="";
             if( $bAll ) {$args .= " en-US";}
             else{
@@ -1069,3 +1070,16 @@ sub usage{
     print STDERR "\nlocalize -m -l cs -f my.sdf\n( Merge cs translation into the sourcecode ) \n";
 }
 
+sub fix_cygwin_path
+{
+    my ( $path ) = @_;
+
+    if ( $^O eq 'cygwin' )
+    {
+    $path = qx{cygpath -m "$path"};
+    chomp($path);
+    }
+
+    return $path;
+}
+


More information about the Libreoffice-commits mailing list