chore: fix Makefile goal gnu-sed
to handle brew, port, and GNU sed on macOS gracefully
#877
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix to PR #853 (tagging @mabdollahpour-ol)
The Makefile goal assumed Brew only, so I added support for Ports and a check for
gsed
to avoid installing it twice. Also note that at least Ports aliasesgsed
assed
such thatmacaron/scripts/dev_scripts/copyright-checker.sh
Lines 55 to 59 in edfe06e
becomes irrelevant. I don’t know how Brew manages overriding macOS CLI tools with GNU tools.
Furthermore, I cleaned up indentation to be consistent with most (not all!) of the Makefile: every line of a rule indents by a single tab, then two spaces within scripts. That way it is easier to tell the difference between tab-indent (four or eight, depending on the editor) and space-indent (always two), and it makes managing block-indents easier & consistent.
Lastly, I think this line
macaron/Makefile
Line 167 in edfe06e
exit 1
to communicate the failure correctly to the running shell.