ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Atul V. Setlur" <aset...@nvisia.com>
Subject Re: [PATCH] modifications to ant shell script to run under cygwin
Date Tue, 20 Feb 2001 23:15:18 GMT
Another option is to use cygpath, a utility that ships with Cygwin. It
has options that print the Unix and the Windows form for a specified
file or path. 

One can convert the Unix path to Windows path before launching Ant in
the following manner if the operating system name corresponds to cygwin
e.g.,

if [ "$OSTYPE" = "CYGWIN_NT-5.0" ] ; then
	LOCALCLASSPATH=`cygpath -w -p $LOCALCLASSPATH`
fi

-Atul
Lucas Gonze wrote:
> 
> The cygwin environment is mainly identical to unix except that java and javac use
> semicolon for classpath separator instead of colon.  I have modified the ant shell
> script to take this into account.  Not extensively tested but works on my system.
> 
> Apologies if this submission is halfbaked.  This is a 'scratch an itch' situation for
> me.  Diff follows and complete version is attached.
> 
> Index: bin/ant
> 
> bash.exe-2.02$ diff /usr/ant/bin/ant-orig /usr/ant/bin/ant
> 2a3,4
> > # modifications by lucas@gonze.com Feb 20, 2001 to make this run under Cygwin.
> >
> 40c42,48
> < LOCALCLASSPATH=`echo $ANT_HOME/lib/*.jar | tr ' ' ':'`
> ---
> > if [ "$OSTYPE" = "cygwin32" ] ; then
> >     LOCALCLASSPATH=`echo $ANT_HOME/lib/*.jar | tr ' ' ';'`
> >     CLASSPATHSEP=";"
> > else
> >     LOCALCLASSPATH=`echo $ANT_HOME/lib/*.jar | tr ' ' ':'`
> >     CLASSPATHSEP=":"
> > fi
> 43c51
> <   LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
> ---
> >   LOCALCLASSPATH="${CLASSPATH}${CLASSPATHSEP}${LOCALCLASSPATH}"
> 48c56
> <     LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
> ---
> >     LOCALCLASSPATH="${LOCALCLASSPATH}${CLASSPATHSEP}${JAVA_HOME}/lib/tools.jar"
> 52c60
> <     LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
> ---
> >     LOCALCLASSPATH="${LOCALCLASSPATH}${CLASSPATHSEP}${JAVA_HOME{/lib/classes.zip"
> 
>   ------------------------------------------------------------------------
>           Name: ant
>    ant    Type: unspecified type (application/octet-stream)
>       Encoding: quoted-printable
> 
>   ------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: ant-dev-help@jakarta.apache.org

Mime
View raw message