ICU-6392 Fixed cygwin pathname issues in gendtjar.pl.
X-SVN-Rev: 24472
This commit is contained in:
parent
34f8b062b4
commit
29041debce
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
# ********************************************************************
|
# ********************************************************************
|
||||||
# * COPYRIGHT:
|
# * COPYRIGHT:
|
||||||
# * Copyright (c) 2002-2007, International Business Machines Corporation and
|
# * Copyright (c) 2002-2008, International Business Machines Corporation and
|
||||||
# * others. All Rights Reserved.
|
# * others. All Rights Reserved.
|
||||||
# ********************************************************************
|
# ********************************************************************
|
||||||
|
|
||||||
@ -14,6 +14,9 @@
|
|||||||
|
|
||||||
# Ram Viswanadha
|
# Ram Viswanadha
|
||||||
# copied heavily from genrbjar.pl
|
# copied heavily from genrbjar.pl
|
||||||
|
#
|
||||||
|
# 6/25/08 - Modified to better handle cygwin paths - Brian Rower
|
||||||
|
#
|
||||||
use File::Find;
|
use File::Find;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
use IO::File;
|
use IO::File;
|
||||||
@ -209,9 +212,21 @@ sub createJar{
|
|||||||
$command="";
|
$command="";
|
||||||
print "INFO: Creating $jarFile\n";
|
print "INFO: Creating $jarFile\n";
|
||||||
if($platform eq "cygwin") {
|
if($platform eq "cygwin") {
|
||||||
$jar = `cygpath -au $jar`;
|
#make sure the given path is a cygwin path not a windows path
|
||||||
chop($jar);
|
$jar = `cygpath -au $jar`;
|
||||||
$tempDir = `cygpath -aw $tempDir`;
|
chop($jar);
|
||||||
|
|
||||||
|
#added by Brian Rower 6/25/08
|
||||||
|
#The following code deals with spaces in the path
|
||||||
|
if(index($jar, "/ ") > 0)
|
||||||
|
{
|
||||||
|
$jar =~ s/[\/]\s/\\ /g;
|
||||||
|
}
|
||||||
|
elsif(index($jar, " ") > 0)
|
||||||
|
{
|
||||||
|
$jar =~ s/\s/\\ /g;
|
||||||
|
}
|
||||||
|
$tempDir = `cygpath -aw $tempDir`;
|
||||||
chop($tempDir);
|
chop($tempDir);
|
||||||
$tempDir =~ s/\\/\\\\/g;
|
$tempDir =~ s/\\/\\\\/g;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user