diff options
author | Robby Russell <robby@planetargon.com> | 2014-06-30 21:00:53 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2014-06-30 21:00:53 -0700 |
commit | 4131a59d1a57d53bf711115317116a6c57483636 (patch) | |
tree | c3b2a746fdc18708b4c18b33c4475f20bf9d4e61 /tools/check_for_upgrade.sh | |
parent | 3913106b2e7127d396f27b652df812340ec0c871 (diff) | |
parent | 08632bb1780d51f6748b5c09ef5232862313f78f (diff) | |
download | zsh-4131a59d1a57d53bf711115317116a6c57483636.tar.gz zsh-4131a59d1a57d53bf711115317116a6c57483636.tar.bz2 zsh-4131a59d1a57d53bf711115317116a6c57483636.zip |
Merge pull request #2827 from ncanceill/easymerge
...you folks are amazing. :-)
"Easy-to-merge"
Diffstat (limited to 'tools/check_for_upgrade.sh')
-rw-r--r-- | tools/check_for_upgrade.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 0f8c9c391..8b8ecae03 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -5,7 +5,7 @@ function _current_epoch() { } function _update_zsh_update() { - echo "LAST_EPOCH=$(_current_epoch)" > ~/.zsh-update + echo "LAST_EPOCH=$(_current_epoch)" >! ~/.zsh-update } function _upgrade_zsh() { @@ -22,6 +22,10 @@ fi [ -f ~/.profile ] && source ~/.profile +# Cancel upgrade if the current user doesn't have write permissions for the +# oh-my-zsh directory. +[[ -w "$ZSH" ]] || return 0 + if [ -f ~/.zsh-update ] then . ~/.zsh-update |