Skip to content

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

Description

@luckman212

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions