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

Compatibility with BSD date #1

Merged
merged 8 commits into from
Mar 31, 2024
Merged

Compatibility with BSD date #1

merged 8 commits into from
Mar 31, 2024

Conversation

gamma
Copy link
Contributor

@gamma gamma commented Mar 5, 2024

The macOS shell has a different date format and does not support the uppercase shortcut.

The macOS shell has a different date format and does not support the uppercase shortcut.
@oh2fih
Copy link
Owner

oh2fih commented Mar 5, 2024

Thanks! Looks good. I'll just test this still works as intended on Linux.

use arithmetic expressions in macOS recognition
oh2fih added 2 commits March 5, 2024 13:46
Awk is already used elsewhere in the script
Use full if-then-else
@oh2fih
Copy link
Owner

oh2fih commented Mar 5, 2024

I have fixed the issues I found. Please test whether this is still compatible with macOS.

oh2fih added 4 commits March 31, 2024 10:46
The Bash on MacOS X is ancient 3.2;
trying to support it will limit development of this script.
Now that Bash < 4.0 is not supported, we can revert this.
Add compatibility information.
@oh2fih oh2fih changed the title Compatibility with macOS shell Compatibility with BSD date Mar 31, 2024
@oh2fih
Copy link
Owner

oh2fih commented Mar 31, 2024

This PR isn't anymore about Mac OS X shell compatibility as it originally was. Because Apple has chosen zsh as the default shell for Mac, trying to make Bash scripts compatible with it would require compatibility with ancient version of Bash. Therefore, a better approach is to require Bash >= 4.0; it can be updated on a Mac from Homebrew.

However, your contribution is still accepted with some modifications as a support for the BSD date. 🎉

@oh2fih oh2fih merged commit 39a8018 into oh2fih:master Mar 31, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants