Skip to content

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

@luckman212

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

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