From c4722328f19e3ba789b6b4a0f269cb54a02700fe Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Mon, 13 Nov 2023 07:05:01 +0000 Subject: [PATCH] Latest --- .../run_before_01-system-homebrew.sh.tmpl | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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 a04a8c14..e9e17947 100644 --- a/home/.chezmoiscripts/universal/run_before_01-system-homebrew.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_before_01-system-homebrew.sh.tmpl @@ -54,14 +54,17 @@ fi ### System upgrade on macOS if [ -d /Applications ] && [ -d /Library ] && [ -z "$NO_RESTART" ]; then echo 'bash <(curl -sSL https://install.doctor/start) # TEMPORARY FOR INSTALL DOCTOR MACOS' >> "$HOME/.zshrc" - if command -v gtimeout > /dev/null; then - logg info 'Ensuring system software is upgraded (timing out after 50 minutes if system upgrade fails)' - gtimeout 3000 sudo softwareupdate -i -a -R || 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' - fi + # TODO - Section below attempts to add timeout to macOS softwareupdate command but is failing to prompt for password (which is required even with /etc/sudoers set up + # if command -v gtimeout > /dev/null; then + # logg info 'Ensuring system software is upgraded (timing out after 50 minutes if system upgrade fails)' + # gtimeout 3000 sudo softwareupdate -i -a -R || 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' + # fi + 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' logg info 'If system updates were downloaded / installed, a reboot might be required.' if command -v gsed > /dev/null; then sudo gsed -i '/# TEMPORARY FOR INSTALL DOCTOR MACOS/d' "$HOME/.zshrc" || logg warn "Failed to remove kickstart script from .zshrc"