Last active
December 2, 2018 17:45
Star
You must be signed in to star a gist
sysadmin script to update macOS mojave in various ways (office and macOs)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
read -n 1 -s -r -p "Press any key to check macOS updates!" | |
macvalue=$( softwareupdatre -l | grep -ic "No new software available.") | |
if [ $macvalue -eq 1 ] | |
then | |
echo "No macOS updates" | |
else | |
read -n 1 -s -r -p "Press any key to run macOS updates!" | |
softwareupdate -i -a | |
echo "you may wanna reboot" | |
fi | |
read -n 1 -s -r -p "Press any key to check microsoft office updates!" | |
cd /Library/Application\ Support/Microsoft/MAU2.0/Microsoft\ AutoUpdate.app/Contents/MacOS | |
value=$( ./msupdate --list | grep -ic "No updates") | |
if [ $value -eq 1 ] | |
then | |
echo "I found no updates" | |
else | |
read -n 1 -s -r -p "Press any key to run Microsoft Office updates!" | |
./msupdate --install | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment