summaryrefslogtreecommitdiff
path: root/oh-my-zsh.sh
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2018-07-11 10:39:25 -0700
committerTuowen Zhao <ztuowen@gmail.com>2018-07-11 10:39:25 -0700
commit852e7fe005267f74f3c04a4ddbb310522eee8014 (patch)
tree73e9f36d8bdcc979d7499580505738074e5a1dc9 /oh-my-zsh.sh
parent59e91cd97fcc3c406751f019215f957b36614022 (diff)
parent7cb5fa8aea3d325fee08e3c1708abd12cdea1c1c (diff)
downloadzsh-852e7fe005267f74f3c04a4ddbb310522eee8014.tar.gz
zsh-852e7fe005267f74f3c04a4ddbb310522eee8014.tar.bz2
zsh-852e7fe005267f74f3c04a4ddbb310522eee8014.zip
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'oh-my-zsh.sh')
-rw-r--r--oh-my-zsh.sh19
1 files changed, 12 insertions, 7 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
index 72527362f..d7c68d35c 100644
--- a/oh-my-zsh.sh
+++ b/oh-my-zsh.sh
@@ -1,6 +1,17 @@
+# Set ZSH_CACHE_DIR to the path where cache files should be created
+# or else we will use the default cache/
+if [[ -z "$ZSH_CACHE_DIR" ]]; then
+ ZSH_CACHE_DIR="$ZSH/cache"
+fi
+
+# Migrate .zsh-update file to $ZSH_CACHE_DIR
+if [ -f ~/.zsh-update ] && [ ! -f ${ZSH_CACHE_DIR}/.zsh-update ]; then
+ mv ~/.zsh-update ${ZSH_CACHE_DIR}/.zsh-update
+fi
+
# Check for updates on initial load...
if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then
- env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh -f $ZSH/tools/check_for_upgrade.sh
+ env ZSH=$ZSH ZSH_CACHE_DIR=$ZSH_CACHE_DIR DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh -f $ZSH/tools/check_for_upgrade.sh
fi
# Initializes Oh My Zsh
@@ -17,12 +28,6 @@ if [[ -z "$ZSH_CUSTOM" ]]; then
ZSH_CUSTOM="$ZSH/custom"
fi
-# Set ZSH_CACHE_DIR to the path where cache files should be created
-# or else we will use the default cache/
-if [[ -z "$ZSH_CACHE_DIR" ]]; then
- ZSH_CACHE_DIR="$ZSH/cache"
-fi
-
# Load all of the config files in ~/oh-my-zsh that end in .zsh
# TIP: Add files you don't want in git to .gitignore