Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/zsh
- thisbuild=$(sw_vers -buildVersion) if [[ $thisbuild[0,2] -lt 20 ]]; then
- nohup osascript -e "display dialog \"Your macOS version is no longer supported.\" with title \"IT Department\" buttons {\"OK\"}" >/dev/null 2>&1 & disown; exit
- fi
- updates=$(softwareupdate -l 2>&1)
- if echo $updates | grep -q "No new"; then echo "- OS is Current."; exit
- elif echo $updates | grep -q "the following new"; then
- echo "- OS is *NOT* Current."
- nohup osascript -e "display dialog \"Apple reports updates to your OS or Apple-bundled
- apps are available.\" with title \"IT Department\" buttons {\"OK\"}" >/dev/null 2>&1 & disown; exit else
- echo "- Error during check."; exit fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement