Re: Bash 3.1.17(8) CR/LF problem

2006-09-29 Thread Malcolm Nixon
Eric Blake wrote: #!/bin/sh IFS=' '''' ' # Yes, that was a space, tab, and line ending I retract this suggestion. On further investigation, bash currently does not treat \r as an IFS whitespace character, and the hacks to the source to make this happen are too invasive for my liking.

Bash 3.1.17(8) CR/LF problem

2006-09-27 Thread Malcolm Nixon
I recently updated to Bash 3.1.17(8) and found my local build system failing due to the removal of CR/LF support: A script on a binary mount that uses \r\n line endings will probably encounter syntax errors or odd variable assignments, because the \r is treated literally. If this happens to you,

RE: Bash 3.1.17(8) CR/LF problem

2006-09-27 Thread Malcolm Nixon
So why isn't using a textmode mount a solution? Packages generally contain the sources, build scripts, tools binaries, etc in a single directory tree. For example a ./configure script located in the package root directory along side other project files. As such placing just the bash scripts in a

Re: Bash 3.1.17(8) CR/LF problem

2006-09-27 Thread Malcolm Nixon
Jonathan Arnold wrote: * Some translate files to a Local format (CR/LF on Windows). Perforce will do this if you let it. Or you can set the LineEnd option for the client to be Unix or Share. This was in fact my original patch attempt, however it had the following problems: * You can

Re: Bash 3.1.17(8) CR/LF problem

2006-09-27 Thread Malcolm Nixon
mwoehlke wrote: Right; non-standard behavior (and any non-binary treatment of '\r' certainly counts!) should - and I might dare even to say must - be disabled by default. Although in this case I can't think of any reason why you would ever have a '\r' in a shell script (other than as part of a

RE: Bash 3.1.17(8) CR/LF problem

2006-09-27 Thread Malcolm Nixon
Jonathan Arnold wrote: You can change the Perforce filetype to be binary, and that way Perforce will leave the cr/lf alone. Then check out the scripts, do a d2u on them, and check them back in. $ p4 edit -t binary myscript.sh I believe this is what I will end up being forced to do. Many of

Re: Bash 3.1.17(8) CR/LF problem

2006-09-27 Thread Malcolm Nixon
Larry Hall (Cygwin) wrote: But what you've described so far isn't adding up and my guess is you're going to have to offer a more convincing argument based on detailed facts relevant to the problem you're having to sway the hearts and minds of those who do the work. I guess I have been somewhat