mrklein / openfoam-os-x

Patches for OpenFOAM(R) to build it on OS X
93 stars 33 forks source link

Patches not zsh compatible with == comparison operator #7

Closed effi closed 9 years ago

effi commented 9 years ago

Another issue I would like to tackle:

The == operator ist not posix compliant, but (more or less) bash specific and doesn't work in a lot of other shells, including my beloved zsh. eg:

[ "$(uname -s)" == "Darwin" ] && export DYLD_LIBRARY_PATH will produce an error in zsh.

Is there anything speaking against changing all == to = so that

[ "$(uname -s)" == "Darwin" ] && export DYLD_LIBRARY_PATH becoms [ "$(uname -s)" = "Darwin" ] && export DYLD_LIBRARY_PATH

If not, I can create a pull request if you like.

Atb Effi

mrklein commented 9 years ago

It is lack of testing, since I use bash. There is nothing special about == (any way man bash suggest "... = may be used in place of == for strict POSIX compliance ...").

I think it will be easier for me to update patches, since I have all (2.2.x, 2.3.1, 2.3.x, 2.4.0, 2.4.x) versions installed.

mrklein commented 9 years ago

Fixed by ea1c09c06c757786e54d0ecc1fc280f58c49e299