summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEric Danielson <edanielson@twitter.com>2012-11-26 11:35:16 -0800
committerEric Danielson <edanielson@twitter.com>2012-11-26 11:35:16 -0800
commit200a25818adf9570186c8ee0abf9d425577ae53b (patch)
tree2cdef50a9a9dc649744d602d398cb1b2180ac3c3 /tools
parentd750e7d9e3b7d04bafc93211f7db4c607ecea19b (diff)
downloadzsh-200a25818adf9570186c8ee0abf9d425577ae53b.tar.gz
zsh-200a25818adf9570186c8ee0abf9d425577ae53b.tar.bz2
zsh-200a25818adf9570186c8ee0abf9d425577ae53b.zip
Add UPDATE_ZSH_DAYS setting
Diffstat (limited to 'tools')
-rw-r--r--tools/check_for_upgrade.sh8
1 files changed, 7 insertions, 1 deletions
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