The Makefile does not work on the Mac
Description of the issue
I downloaded the latest release of OEO to my Mac and ran “make”, but seem to be experiencing a compatibility problem with the “sed” command.
$ make mkdir -p build/oeo/1.13.0/imports mkdir -p build/oeo/1.13.0/modules cp src/ontology/catalog-v001.xml build/oeo/1.13.0/catalog-v001.xml sed -i -E "s/http:\/\/openenergy-platform\.org\/ontology\/oeo\/dev\/([a-zA-Z/\.\-]+)/http:\/\/openenergy-platform\.org\/ontology\/oeo\/releases\/1.13.0\/\1/m" build/oeo/1.13.0/catalog-v001.xml sed: 1: "s/http:\/\/openenergy-p ...": \1 not defined in the RE make: *** [build/oeo/1.13.0/catalog-v001.xml] Error 1
(I think I worked around the markdown syntax, by doubling all the backslashes, so that it looks right here.) It turns out that the Makefile depends on the GNU version of the “sed” command, which is not available on OS X.
Ideas of solution
The regular expressions could be adjusted to work with the traditional BSD version of the “sed” command, which I believe is available on every variant of *nix. Moreover, it is also possible to rewrite them more simply, without escaping all those slashes. For example:
$ echo "http://openenergy-platform.org/ontology/oeo/dev/test.xxx" | sed "s,http://openenergy-platform.org/ontology/oeo/dev/([a-zA-Z/.-]*),http://openenergy-platform.org/ontology/oeo/releases/1.13.0/\1,"
Which outputs:
http://openenergy-platform.org/ontology/oeo/releases/1.13.0/test.xxx
(Again. I think I worked around the markdown syntax so that it looks right here.)
Workflow checklist
- [X] I am aware of the workflow for this repository
Taking a look at this