diff --git a/home/.chezmoiscripts/universal/run_before_01-system-homebrew.sh.tmpl b/home/.chezmoiscripts/universal/run_before_01-system-homebrew.sh.tmpl index c91f20ae..a3df3414 100644 --- a/home/.chezmoiscripts/universal/run_before_01-system-homebrew.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_before_01-system-homebrew.sh.tmpl @@ -30,17 +30,19 @@ ### System upgrade on macOS # Note: If a shutdown is required and the `softwareupdate` command restart command does not work then `m shutdown -f` might be useful or `m restart -f` +# Do you want to terminate running processes in this window? +# Closing this window will terminate the running processes: softwareupdate, sudo if [ -d /Applications ] && [ -d /Library ] && [ -z "$NO_RESTART" ]; then if [ ! -f "$HOME/.zshrc" ] || ! cat "$HOME/.zshrc" | grep '# TEMPORARY FOR INSTALL DOCTOR MACOS' > /dev/null; then echo 'bash <(curl -sSL https://install.doctor/start) # TEMPORARY FOR INSTALL DOCTOR MACOS' >> "$HOME/.zshrc" fi if command -v gtimeout > /dev/null; then logg info 'Ensuring system software is upgraded (timing out after 50 minutes if system upgrade fails)' - sudo gtimeout 3000 softwareupdate -i -a -R || logg warn 'The system update command timed out after 50 minutes' + sudo gtimeout 3000 softwareupdate -i -a -R --agree-to-license || logg warn 'The system update command timed out after 50 minutes' else # If gtimeout is unavailable, then attempt system upgrade without a timeout (which usually works on fresh systems) logg info 'Applying OS upgrades (if available)' - sudo softwareupdate -i -a -R || logg error 'Failed to perform a system update via sudo softwareupdate -i -a -R' + sudo softwareupdate -i -a -R --agree-to-license || logg error 'Failed to perform a system update via sudo softwareupdate -i -a -R' fi logg info 'If system updates were downloaded / installed, a reboot might be required.' if command -v gsed > /dev/null; then