wmake-with-bear doesn't work with macOS properly
Summary
wmake-with-bear doesn't work with macOS properly
Steps to reproduce
Use the patch provided by https://github.com/mrklein/openfoam-os-x (tested with normal installation, no problem).
$ brew install bear
$ bear --version
bear 3.0.8
$ ./Allwmake -with-bear > log.Allwmake 2>&1
Example case
What is the current bug behaviour?
sed: 1: "1{ s/^[^0-9]*\([1-9]\)/ ...": bad flag in substitute command: '}'
Warning: bear not found
Stopping
This is caused by the macOS variant of sed
.
Need to install gnu-sed
in Homebrew and add PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
However installing too many conflicting packages is not a good idea.
What is the expected correct behavior?
Relevant logs and/or images
Environment information
- OpenFOAM version : v2012
- Operating system : macOS
- Hardware info : x86
- Compiler : Clang
Possible fixes
Implement a universal command (or consider awk
) to extract the version number.
For example, removing the curly brackets {} works in macOS.
Edited by Guanyang Xue