From dev-return-50124-apmail-ant-dev-archive=ant.apache.org@ant.apache.org Mon Sep 01 10:53:04 2003 Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 67897 invoked from network); 1 Sep 2003 10:53:04 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 1 Sep 2003 10:53:04 -0000 Received: (qmail 14819 invoked by uid 500); 1 Sep 2003 10:52:57 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 14748 invoked by uid 500); 1 Sep 2003 10:52:56 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 14706 invoked by uid 500); 1 Sep 2003 10:52:55 -0000 Received: (qmail 14698 invoked from network); 1 Sep 2003 10:52:55 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 1 Sep 2003 10:52:55 -0000 Received: (qmail 67784 invoked by uid 1652); 1 Sep 2003 10:52:43 -0000 Date: 1 Sep 2003 10:52:43 -0000 Message-ID: <20030901105243.67783.qmail@minotaur.apache.org> From: antoine@apache.org To: ant-cvs@apache.org Subject: cvs commit: ant/src/script runant.pl X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org