summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2012-11-30 05:47:32 -0800
committerRobby Russell <robby@planetargon.com>2012-11-30 05:47:32 -0800
commit533a2819196db2e29d5eb30b0bbf946802211a13 (patch)
treeaa6e02cd368f5501f37701f45656e3827b43e28e
parent8a2314edee37c3af1bb6aab14fc211663fd0ce65 (diff)
parent200a25818adf9570186c8ee0abf9d425577ae53b (diff)
downloadzsh-533a2819196db2e29d5eb30b0bbf946802211a13.tar.gz
zsh-533a2819196db2e29d5eb30b0bbf946802211a13.tar.bz2
zsh-533a2819196db2e29d5eb30b0bbf946802211a13.zip
Merge pull request #1430 from danielsoneg/egd-update_frequency
Add UPDATE_ZSH_DAYS setting
-rw-r--r--templates/zshrc.zsh-template3
-rw-r--r--tools/check_for_upgrade.sh8
2 files changed, 10 insertions, 1 deletions
diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
index e52553241..758fc26b8 100644
--- a/templates/zshrc.zsh-template
+++ b/templates/zshrc.zsh-template
@@ -17,6 +17,9 @@ ZSH_THEME="robbyrussell"
# Comment this out to disable weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
+# Change this value to set how frequently ZSH updates¬
+export UPDATE_ZSH_DAYS=13
+
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
index 612901cbe..581f03a07 100644
--- a/tools/check_for_upgrade.sh
+++ b/tools/check_for_upgrade.sh
@@ -14,6 +14,12 @@ function _upgrade_zsh() {
_update_zsh_update
}
+epoch_target=$UPDATE_ZSH_DAYS
+if [[ -z "$epoch_target" ]]; then
+ # Default to old behavior
+ epoch_target=13
+fi
+
if [ -f ~/.zsh-update ]
then
. ~/.zsh-update
@@ -23,7 +29,7 @@ then
fi
epoch_diff=$(($(_current_epoch) - $LAST_EPOCH))
- if [ $epoch_diff -gt 13 ]
+ if [ $epoch_diff -gt $epoch_target ]
then
if [ "$DISABLE_UPDATE_PROMPT" = "true" ]
then