that is a far cleaner approach than mine. We should use it.
But I see that your version of cygwin lists ostype as "CYGWIN_NT-5.0", while my
version cygwin on win98 lists ostype as "cygwin". So that is a secondary bug.
I don't know shell syntax to match both of those expressions. In java this
would be:
if( ostype.toLowerCase().indexOf("cygwin") == 0 ) {...}
suggestions?
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Behalf Of Atul V. Setlur
> Sent: Tuesday, February 20, 2001 6:15 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PATCH] modifications to ant shell script to run under
> cygwin
>
>
> 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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>