ICU-6392 Fixed cygwin pathname issues in gendtjar.pl.

X-SVN-Rev: 24472
This commit is contained in:
Brian Rower 2008-08-08 18:59:54 +00:00
parent 34f8b062b4
commit 29041debce

View File

@ -1,7 +1,7 @@
#!/usr/bin/perl
# ********************************************************************
# * COPYRIGHT:
# * Copyright (c) 2002-2007, International Business Machines Corporation and
# * Copyright (c) 2002-2008, International Business Machines Corporation and
# * others. All Rights Reserved.
# ********************************************************************
@ -14,6 +14,9 @@
# Ram Viswanadha
# copied heavily from genrbjar.pl
#
# 6/25/08 - Modified to better handle cygwin paths - Brian Rower
#
use File::Find;
use File::Basename;
use IO::File;
@ -209,8 +212,20 @@ sub createJar{
$command="";
print "INFO: Creating $jarFile\n";
if($platform eq "cygwin") {
#make sure the given path is a cygwin path not a windows path
$jar = `cygpath -au $jar`;
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);
$tempDir =~ s/\\/\\\\/g;