From a72b4d6c6d0450927e9381ab786ba32e5f547fdb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 20 Dec 2015 23:40:38 -0500 Subject: [PATCH] update.zsh: brew cleanup + software update -i -a --- scripts/update.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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" ]] && {