antoine 2003/09/01 03:52:43
Modified: src/script runant.pl
Log:
Add cygwin support in runant.pl
Revision Changes Path
1.7 +18 -1 ant/src/script/runant.pl
Index: runant.pl
===================================================================
RCS file: /home/cvs/ant/src/script/runant.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- runant.pl 1 Sep 2003 10:14:26 -0000 1.6
+++ runant.pl 1 Sep 2003 10:52:43 -0000 1.7
@@ -61,6 +61,8 @@
$onnetware = 1;
}
+my $oncygwin = ($^O eq "cygwin");
+
#ISSUE: what java wants to split up classpath varies from platform to
platform
#and perl is not too hot at hinting which box it is on.
#here I assume ":" 'cept on win32, dos, and netware. Add extra tests here as
needed.
@@ -105,6 +107,17 @@
#construct arguments to java
my @ARGS;
push @ARGS, @ANT_OPTS;
+
+my $CYGHOME = "";
+
+if ($oncygwin == 1) {
+ $localpath = `cygpath --path --windows $localpath`;
+ chomp ($localpath);
+ $HOME = `cygpath --path --windows $HOME`;
+ chomp ($HOME);
+ $CYGHOME = `cygpath --path --windows $ENV{HOME}`;
+ chomp ($CYGHOME);
+}
if ($onnetware == 1)
{
# make classpath literally $CLASSPATH; and then the contents of $localpath
@@ -117,6 +130,10 @@
push @ARGS, "-classpath", "$localpath";
}
push @ARGS, "-Dant.home=$HOME";
+if ( ! $CYGHOME eq "" )
+{
+ push @ARGS, "-Dcygwin.user.home=\"$CYGHOME\""
+}
push @ARGS, "org.apache.tools.ant.launch.Launcher", @ANT_ARGS;
push @ARGS, @ARGV;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]