ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Atherton <>
Subject RE: Cygwin, bash and OSTYPE
Date Wed, 05 Dec 2001 02:03:04 GMT
At 10:26 AM 12/5/2001 +1100, Tim Vernum wrote:
>From: Morrison, John []
>What would you change it to?
>/bin/sh is the standard unix shell.
>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. However, since $OSTYPE is only used in 
determining the presence of cygwin, the script only requires bash on cygwin.

Clearly what is needed is a better test for cygwin, one that is sh (or, in 
cygwin's case, ash) compatible. What that test might be, though, I don't 
know. Testing an environmental variable that is set by Windows, such as 
COMSPEC? Looking for "cygwin.bat" or "cygwin.ico" in root? Either solution 
is a gross hack that is bound to result in false positives eventually.

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?

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message