summaryrefslogtreecommitdiff
path: root/tools
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 /tools
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 'tools')
-rw-r--r--tools/check_for_upgrade.sh8
-rwxr-xr-xtools/install.sh8
2 files changed, 8 insertions, 8 deletions
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
index b42b87750..05b31e8d4 100644
--- a/tools/check_for_upgrade.sh
+++ b/tools/check_for_upgrade.sh
@@ -7,7 +7,7 @@ function _current_epoch() {
}
function _update_zsh_update() {
- echo "LAST_EPOCH=$(_current_epoch)" >! ~/.zsh-update
+ echo "LAST_EPOCH=$(_current_epoch)" >! ${ZSH_CACHE_DIR}/.zsh-update
}
function _upgrade_zsh() {
@@ -30,11 +30,11 @@ fi
whence git >/dev/null || return 0
if mkdir "$ZSH/log/update.lock" 2>/dev/null; then
- if [ -f ~/.zsh-update ]; then
- . ~/.zsh-update
+ if [ -f ${ZSH_CACHE_DIR}/.zsh-update ]; then
+ . ${ZSH_CACHE_DIR}/.zsh-update
if [[ -z "$LAST_EPOCH" ]]; then
- _update_zsh_update && return 0;
+ _update_zsh_update && return 0
fi
epoch_diff=$(($(_current_epoch) - $LAST_EPOCH))
diff --git a/tools/install.sh b/tools/install.sh
index ad47df785..0cc020053 100755
--- a/tools/install.sh
+++ b/tools/install.sh
@@ -59,7 +59,7 @@ main() {
exit 1
fi
fi
- env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git $ZSH || {
+ env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git "$ZSH" || {
printf "Error: git clone of oh-my-zsh repo failed\n"
exit 1
}
@@ -72,9 +72,9 @@ main() {
fi
printf "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc${NORMAL}\n"
- cp $ZSH/templates/zshrc.zsh-template ~/.zshrc
+ cp "$ZSH"/templates/zshrc.zsh-template ~/.zshrc
sed "/^export ZSH=/ c\\
- export ZSH=$ZSH
+ export ZSH=\"$ZSH\"
" ~/.zshrc > ~/.zshrc-omztemp
mv -f ~/.zshrc-omztemp ~/.zshrc
@@ -108,7 +108,7 @@ main() {
echo 'p.p.s. Get stickers and t-shirts at https://shop.planetargon.com.'
echo ''
printf "${NORMAL}"
- env zsh
+ env zsh -l
}
main