Skip to content

Instantly share code, notes, and snippets.

@atchoo78
Created July 14, 2023 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atchoo78/636c5ccbb656db719d861d6ae2642ae2 to your computer and use it in GitHub Desktop.
Save atchoo78/636c5ccbb656db719d861d6ae2642ae2 to your computer and use it in GitHub Desktop.
Turn "Allow apps from anywhere" (Gatekeeper) option in macOS On or Off
gatekeeper() {
if [ "$1" == "off" ]
then
sudo spctl --master-disable
elif [ "$1" == "on" ]
then
sudo spctl --master-enable
else
sudo spctl --master-enable
fi
echo "GateKeeper is $1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment