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

Does not work in macos big sur #4

Open
joobei opened this issue Mar 3, 2021 · 2 comments
Open

Does not work in macos big sur #4

joobei opened this issue Mar 3, 2021 · 2 comments

Comments

@joobei
Copy link

joobei commented Mar 3, 2021

Error message says that it only support macos 10.8+

@sth0
Copy link

sth0 commented Feb 19, 2022

Yes, since it is comparing 11.X to 10.8 by comparing X to 8 and X is 6 or less. the same is true for Monterey where it is comparing 12.2 to 10.8 by comparing 2 to 8.

If the function using the bc command is defined:
ifbc () { test $(echo "$@" | bc -l ) -ne 0; }

Then the test could be changed to
ifbc "sw_vers -productVersion | cut -d. -f1,2 > 10.8" && echo "true, it's greater" || echo "no, it's less or ="

@sth0
Copy link

sth0 commented Feb 19, 2022

If the version test code at the point of the "# check compatibility" comment is replaced by the following it should work.

# use bc as numerical decimal test
ifbc () { test $(echo "$@" | bc -l ) -ne 0; }

# check compatibility
# get version in XX.YY form
MACOS2NO=$(/usr/bin/sw_vers -productVersion | cut -d. -f1,2)
if ( ifbc "$MACOS2NO < 10.8" ) ; then

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

No branches or pull requests

2 participants