On 3/23/2011 2:01 AM, Roland Knall wrote:
Hi
Another issue, at least for me, has been the Windows file endings. In
the file win-setup.sh, there are several file-endings written with
\r\n, which is Windows specific. The cygwin bash can not handle this
file with those endings. Open the file with a text-editor which allows
you to change the line-endings (Notepad++, Notepad2, or any other more
sophisticated), and specifically save the file with unix line endings.
Actually (for the record), changing the line-endings should not be
necessary.
The patch given in the previous EMail ensures that the cygwin bash
option 'igncr' is used when win-setup.sh is run so that cygwin
bash "ignores carriage returns" in the file.
A recent change to cygwin bash-4.1.9-2 requires that 'set -o igncr' be
used rather than the previously used 'shopt -s igncr'.
From: http://cygwin.com/ml/cygwin-announce/2011-02/msg00001.html
4a. For a single affected script, add this line just after the she-bang:
(set -o igncr) 2>/dev/null && set -o igncr; # comment is needed
<snip>
4e. bash-4.1.9-1 dropped support for 'shopt -s igncr'; it did not make
sense to support the option through both set and shopt, ...