From ed457cbee7a9f1b962848272fb7eda6b4af010c3 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Wed, 23 Sep 2009 17:12:19 -0700 Subject: [PATCH] Oh My Zsh gets a weekly auto-updater... the future is now! --- lib/misc.zsh | 10 +++++++++- templates/zshrc.zsh-template | 3 +++ tools/upgrade.sh | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/misc.zsh b/lib/misc.zsh index fab4be9..8d67272 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -6,4 +6,12 @@ zle -N self-insert url-quote-magic bindkey "^[m" copy-prev-shell-word ## jobs -setopt long_list_jobs \ No newline at end of file +setopt long_list_jobs + +# Check for updates on initial load... +if [ "$DISABLE_AUTO_UPDATE" = "true" ] +then + return +else + /bin/sh $ZSH/tools/check_for_upgrade.sh +fi diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index b8da514..787dc3d 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -5,6 +5,9 @@ export ZSH=$HOME/.oh-my-zsh # Look in ~/.oh-my-zsh/themes/ export ZSH_THEME="robbyrussell" +# Comment this out to disable weekly auto-update checks +# export DISABLE_AUTO_UPDATE="false" + source $ZSH/oh-my-zsh.sh # Customize to your needs... diff --git a/tools/upgrade.sh b/tools/upgrade.sh index fa07daa..f749404 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -1,5 +1,5 @@ current_path=`pwd` echo "Upgrading Oh My Zsh" ( cd $ZSH && git pull origin master ) -echo "Done." +echo "Hooray! Oh My Zsh has been updated and/or is at the current version. \nAny new updates will be reflected when you start your next terminal session." cd $current_path \ No newline at end of file