update.zsh: brew cleanup + software update -i -a
This commit is contained in:
parent
076b91ce06
commit
a72b4d6c6d
|
@ -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" ]] && {
|
||||||
|
|
Loading…
Reference in a new issue