update.zsh: brew cleanup + software update -i -a

This commit is contained in:
Henrik Lissner 2015-12-20 23:40:38 -05:00
parent 076b91ce06
commit a72b4d6c6d

View file

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