Update update.zsh update

This commit is contained in:
Henrik Lissner 2016-02-22 15:44:21 -05:00
parent 1f9e6572bb
commit d8c7740e11

View file

@ -9,8 +9,6 @@ up-to-date() {
[[ "$LOCAL" == "$REMOTE" ]] [[ "$LOCAL" == "$REMOTE" ]]
} }
sudo softwareupdate -i -a
(( $+commands[brew] )) && { (( $+commands[brew] )) && {
echo "Updating homebrew" echo "Updating homebrew"
{ brew update; brew upgrade --all; brew cleanup } | indent { brew update; brew upgrade --all; brew cleanup } | indent
@ -27,19 +25,14 @@ do
[[ -d "$HOME/.${i}env" ]] && { [[ -d "$HOME/.${i}env" ]] && {
echo "Updating ${i}env" echo "Updating ${i}env"
{ {
if ! up-to-date; then git pull > /dev/null
echo "UPDATING"
git pull > /dev/null
fi
{ {
for plugin in "$HOME"/.${i}env/plugins/* for plugin in "$HOME"/.${i}env/plugins/*
do do
cd "$plugin" cd "$plugin"
if ! up-to-date; then echo "+ `basename ${plugin}`"
echo "+ UPDATING `basename ${plugin}`" git pull > /dev/null
git pull > /dev/null
fi
done done
} 2&>1 | indent } 2&>1 | indent
} 2&>1 | indent } 2&>1 | indent