From 00a190bc017283ef8ab8c725c5f9fe93f030e31e 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 fab4be931..8d6727251 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 b8da51428..787dc3d09 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 fa07daaea..f749404e9 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