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

Small change to allow privilegedHelperToolStatus to run on Big Sur #1

Open
luckman212 opened this issue May 14, 2021 · 0 comments
Open

Comments

@luckman212
Copy link

Hi @erikberglund 👋

Here's a small change that I tested to allow your (very useful) privilegedHelperToolStatus script to run on macOS 11.x

change this section

elif (( $( sw_vers -productVersion | awk -F. '{ print $2 }' ) < 10 )); then
printf "%s\n" "This script requires OS X 10.10 or higher (because of the use of launchctl plist)" 1>&2
exit 1
fi

to:

IFS='.' read -r maj min _ < <(sw_vers -productVersion)
printf -v normalized_ver '%d%02d' "$maj" "$min"
if (( normalized_ver < 1010 )); then
  printf '%s\n%s\n' "This script requires macOS 10.10 or higher (because of the use of launchctl plist)" "You seem to be running $maj.$min" 1>&2
  exit 1
fi
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

1 participant