diff --git a/scripts/update.zsh b/scripts/update.zsh index b7e3099c..0321de51 100755 --- a/scripts/update.zsh +++ b/scripts/update.zsh @@ -3,15 +3,17 @@ set -e indent() { sed 's/^/ /'; } -up-to-date() { +up-to-date() { LOCAL=$(git rev-parse @) REMOTE=$(git rev-parse @{u}) [[ "$LOCAL" == "$REMOTE" ]] } +sudo softwareupdate -i -a + (( $+commands[brew] )) && { echo "Updating homebrew" - { brew update && brew upgrade --all; } | indent + { brew update; brew upgrade --all; brew cleanup } | indent } [[ -f "$HOME/.emacs.d/Makefile" ]] && {