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 Tue, 04 Dec 2001 23:26:31 GMT
From: Morrison, John [mailto:John.Morrison@uk.experian.com]

> Sorry, I should have said; it's the #!/bin/shell instruction 
> which needs to
> be changed.  Not the shell you're running...


What would you change it to?
/bin/sh is the standard unix shell.

95% of unix versions don't have /bin/bash

You could do something hacky like :

---8<---8<----
if [ -z "$OSTYPE" ]
then
	if [ -x /bin/bash ]
	then
		OSTYPE=`/bin/bash -c 'echo $OSTYPE'`
	fi
fi

echo "OS = $OSTYPE"
---8<---8<----

> > -----Original Message-----
> > From: Morrison, John [mailto:John.Morrison@uk.experian.com]
> > Sent: Tuesday, 04 December 2001 3:55 pm
> > To: 'ant-dev@jakarta.apache.org'
> > Subject: Cygwin, bash and OSTYPE
> > 
> > 
> > Hi All,
> > 
> > I recently upgraded my (cygwin) bash.  This caused 
> > bootstrap.sh to fail,
> > confused I checked everything twice, echo'd $OSTYPE to 
> ensure it still
> > reported cygwin.  Eventually, I found the error... OSTYPE is 
> > not exported
> > under /bin/sh.  Changing the shell to bash fixes it.  Would 
> > it be a terrible
> > upset to folks to change this?
> > 
> > Thanks,
> > 
> > J. 
> > 
> > PS I'm thinking that *lots* of projects will be caught out 
> > with this...
> > 
> > 
> > ==============================================================
> > =========
> > Information in this email and any attachments are 
> > confidential, and may
> > not be copied or used by anyone other than the addressee, nor 
> > disclosed
> > to any third party without our permission.  There is no intention to
> > create any legally binding contract or other commitment 
> > through the use
> > of this email.
> > 
> > Experian Limited (registration number 653331).  
> > Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF
> > 
> > --
> > To unsubscribe, e-mail:   
> <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:ant-dev-help@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   
> <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:ant-dev-help@jakarta.apache.org>
> 


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