Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac support #5

Merged
merged 2 commits into from
Jun 6, 2022
Merged

Mac support #5

merged 2 commits into from
Jun 6, 2022

Conversation

aaossa
Copy link
Owner

@aaossa aaossa commented Jun 2, 2022

Related to issues mentioned in #1 . Introduces a new shebang that should map to the newest version of bash available. Also checks if the available date command is GNU date, if that's not the case tries to use gdate, and if that's not the case it ends with an error and a message about installing coreutils.

As commented in #1, `bash` is not always in `/bin`, particularly on
non-Linux systems (as covered in [1]). This new shebang searches PATH
for `bash` and should use the first `bash` found (hopefully is the
newest)

[1]: https://stackoverflow.com/a/21613044/3281097

Signed-off-by: Antonio Ossa Guerra <[email protected]>
On BSD-related environment (mostly related to Mac OS) the default
`date` does not point to the GNU date version that this script
expects. So, we'll check if the available `date` command is GNU date,
if that's not the case we'll try to use `gdate`, from `coreutils`, and
raise an exception if none of them is available. This behaviour was
reported in #1

Signed-off-by: Antonio Ossa Guerra <[email protected]>
@aaossa aaossa added the enhancement New feature or request label Jun 2, 2022
@aaossa aaossa self-assigned this Jun 2, 2022
@aaossa aaossa added bug Something isn't working labels Jun 3, 2022
@aaossa aaossa merged commit ea89540 into main Jun 6, 2022
@aaossa aaossa deleted the provide-mac-support branch June 6, 2022 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant