ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Vernum <Tim.Ver...@macquarie.com>
Subject RE: Cygwin, bash and OSTYPE
Date Wed, 05 Dec 2001 02:33:55 GMT

From: Bruce Atherton [mailto:bruce@callenish.com]

> >95% of unix versions don't have /bin/bash
> 
> The problem is that $OSTYPE is only defined in bash, so in theory the 
> script itself requires bash.

Not at all.
sh does not (normally) fail on undefined variables.
It is perfectly valid to test the value of $OSTYPE on all versions
of /bin/sh.

> Does anyone know whether the members of the cygwin mailing 
> list have any 
> advice on the preferred method for detecting that you are 
> running in cygwin 
> from within their /bin/sh?

I don't know what they say, but I strongly suggest using uname.

For me, uname -a gives:

	CYGWIN_NT-4.0 <<hostname>> 1.3.2(0.39/3/2) 2001-05-20 23:28 i686 unknown

Or
uname -s
	CYGWIN_NT-4.0

Is that still the case on later versions?


NOTICE
This e-mail and any attachments are confidential and may contain copyright material of Macquarie
Bank or third parties. If you are not the intended recipient of this email you should not
read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and
should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any
emails or any attached files. The views or opinions expressed are the author's own and may
not reflect the views or opinions of Macquarie Bank. 


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message