533a2819196db2e29d5eb30b0bbf946802211a13
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Merge pull request #1430 from danielsoneg/egd-update_frequency
Add UPDATE_ZSH_DAYS setting
Diff
1diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
2index e525532414557e76e924159dc592ea61fe635bb2..758fc26b8b1268b9f2b25f38d52d06bf936e255a 100644
3--- a/templates/zshrc.zsh-template
4+++ b/templates/zshrc.zsh-template
5@@ -17,6 +17,9 @@ ZSH_THEME="robbyrussell"
6 # Comment this out to disable weekly auto-update checks
7 # DISABLE_AUTO_UPDATE="true"
8
9+# Change this value to set how frequently ZSH updates¬
10+export UPDATE_ZSH_DAYS=13
11+
12 # Uncomment following line if you want to disable colors in ls
13 # DISABLE_LS_COLORS="true"
14
15diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
16index 612901cbe5e122b8a3ac0ebe3b5e72b4c3948b58..581f03a07f3a56a84e55b033e4f86c5d8778c39c 100644
17--- a/tools/check_for_upgrade.sh
18+++ b/tools/check_for_upgrade.sh
19@@ -14,6 +14,12 @@ function _upgrade_zsh() {
20 _update_zsh_update
21 }
22
23+epoch_target=$UPDATE_ZSH_DAYS
24+if [[ -z "$epoch_target" ]]; then
25+ # Default to old behavior
26+ epoch_target=13
27+fi
28+
29 if [ -f ~/.zsh-update ]
30 then
31 . ~/.zsh-update
32@@ -23,7 +29,7 @@ then
33 fi
34
35 epoch_diff=$(($(_current_epoch) - $LAST_EPOCH))
36- if [ $epoch_diff -gt 13 ]
37+ if [ $epoch_diff -gt $epoch_target ]
38 then
39 if [ "$DISABLE_UPDATE_PROMPT" = "true" ]
40 then