summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2009-09-23 17:12:19 -0700
committerRobby Russell <robby@planetargon.com>2009-09-23 17:12:19 -0700
commit00a190bc017283ef8ab8c725c5f9fe93f030e31e (patch)
tree69e3a2f073ef002eb3f4148aa056cd442d7fa484
parent700a3f0badf89fc9bb5a8f54b5fd2e14aed2823d (diff)
downloadzsh-00a190bc017283ef8ab8c725c5f9fe93f030e31e.tar.gz
zsh-00a190bc017283ef8ab8c725c5f9fe93f030e31e.tar.bz2
zsh-00a190bc017283ef8ab8c725c5f9fe93f030e31e.zip
Oh My Zsh gets a weekly auto-updater... the future is now!
-rw-r--r--lib/misc.zsh10
-rw-r--r--templates/zshrc.zsh-template3
-rw-r--r--tools/upgrade.sh2
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