moodlehq / moodle-docker

A docker environment for moodle developers
GNU General Public License v3.0
373 stars 244 forks source link

#188 Fix scripts in MacOS #282

Closed NoelDeMartin closed 3 months ago

NoelDeMartin commented 3 months ago

Fixes #188.

grep -P is not supported in MacOS, replacing it with sed should work everywhere.

stronk7 commented 3 months ago

Personal opinion: I think that anybody trying to use any of our tools should have their GNU incarnations, because it's not only grep the one with differences between GNU and BSD.

For Macs, there are a bunch of package managers (homebrew, macports, ...) that have them, and it's easy to make them to get priority over the OS ones.

Anyway, I don't oppose to this change. Just hope GNU sed is the same 100% than BSD sed (I don't mind because I've the GNU one installed here, but be warned that they may be different too!

Edited: Just searched by curiosity, and there are also differences with sed (link). So I insist about always trying to get the GNU alternatives, there is not guarantee out from them.

stronk7 commented 3 months ago

Merged, thanks!

NoelDeMartin commented 3 months ago

Thanks for merging @stronk7. We have tested these in MacOS and they work without installing any special packages, so hopefully that makes it work everywhere.