Improve Mac support and clean up dependencies #530
Merged
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.
On the mac we only have older bash versions. Installing a newer bash 4 or 5 via brew is possible, but sub-scripts still include /bin/bash via the # first line directive (reported here #528 ). Modifying that line could break portability to other OSs (maybe
#!/usr/bin/env bash
is portable but poses a privilege escalation security threat). Therefore we replace all bash 4.* functionality with alternatives that are supported with older bash 3.1.|&
gets replaced with2>&1 |
@Q
expansion gets replaced withprintf %q
(available since bash 3.1)delim_whitespace?
gets updated tosep='\s+'
(this is really independent of the mac version).