This commit is contained in:
Brian Zalewski 2024-01-02 00:50:02 +00:00
parent dde63cc16a
commit 5dd6332389

View file

@ -131,9 +131,11 @@ upgradeDarwin() {
fi fi
### Run upgrade process ### Run upgrade process
logg info 'Listing available OS upgrades' && softwareupdate -l HEY="$(softwareupdate -l)"
logg info 'Applying OS upgrades (if available)' logg info 'Listing available OS upgrades'
logg info 'This may take awhile..' UPDATE_CHECK="$(softwareupdate -l)"
if [ "$UPDATE_CHECK" != "No new software available." ]; then
logg info 'Applying OS upgrades (if available). This may take awhile..'
expect -c "set timeout -1 expect -c "set timeout -1
spawn sudo softwareupdate -i -a --agree-to-license spawn sudo softwareupdate -i -a --agree-to-license
expect \"Password:\" expect \"Password:\"
@ -170,6 +172,8 @@ upgradeDarwin() {
else else
logg info 'No reboot required for softwareupdate' logg info 'No reboot required for softwareupdate'
fi fi
fi
if [ -f "$HOME/.zshrc" ]; then if [ -f "$HOME/.zshrc" ]; then
logg info 'Ensuring provision kickstart script is removed from ~/.zshrc' logg info 'Ensuring provision kickstart script is removed from ~/.zshrc'
if command -v gsed > /dev/null; then if command -v gsed > /dev/null; then