Wireshark-dev: Re: [Wireshark-dev] Cygwin Bash update breaks verify_tools
From: "Bill Meier" <wmeier@xxxxxxxxxxx>
Date: Sun, 15 Oct 2006 23:55:47 -0400
> 
> 
> It turns out that there's a fair amount of discussion on the Cygwin mailing 
> list about changes made in Cygwin Bash handling of \r\n in script files in 
> versions after v 3.1-6 to improve Cygwin Bash performance.
> 
> See http://cygwin.com/ml/cygwin/2006-10/msg00079.html for the latest 
> announcement.
> 
> I'm reviewing the choices as to how to handle this change and will post my 
> thoughts in a day or so. 
> 
> Bill


As mentioned i the previous EMail, Cygwin Bash versions 3.1-8 and 3.1-9 have 
changed their handling of \r\n in Bash sripts on Cygwin file structures 
mounted as 'bin' (the recommended configuration). 

The result of the change is that Wireshark Bash scripts under Cygwin may or 
will fail (since normally the scripts downloaded to Windows will have \r\n as 
line terminators).

(See the cygwin mailing list (http://www.cygwin.com/ml/cygwin) for lots of 
detailed discussion).

V 3.1-9 implements a shell option 'igncr' which, when enabled, causes \r 
characters in Bash scripts to be ignored.

It appears to me that currently a good way to allow Wireshark to build using 
Cygwin Bash v3.1-9 on Windows is to define the BASH_ENV environment variable 
(in Windows) specifying a file which contains the following (exactly as 
shown):

shopt -s igncr;#

This file will be read and executed whenever Cygwin Bash is invoked non-
interactively. (Note that this will not work on Bash v3.1-8).

Having said all of the above, it appears that a v 3.1-10 release is being 
considered which may improve matters further possibly meaning that Wireshark 
will again build successfully on Windows  with an 'out-of-the-box' Cygwin 
installation.

So: another option is just to stay with Bash v3.1-6 until the situation 
further resolves itself.

Bill Meier