diff options
| author | Mike McQuaid | 2016-08-10 14:18:39 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2016-08-10 15:37:04 +0100 |
| commit | 0c6e307eef57c48d03e1213112d3edd597ce5a7b (patch) | |
| tree | 9ee138f474ca797e36a0d0d0c3a889424e41d561 | |
| parent | 1a240cd52a48a66e213706eba88055f6fd6b0f67 (diff) | |
| download | brew-0c6e307eef57c48d03e1213112d3edd597ce5a7b.tar.bz2 | |
update.sh: all configurable HOMEBREW_AUTO_UPDATE_SECS.
| -rw-r--r-- | Library/Homebrew/cmd/update.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 3fa5ba1fb..d622352a2 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -314,6 +314,11 @@ EOS set -x fi + if [[ -z "$HOMEBREW_AUTO_UPDATE_SECS" ]] + then + HOMEBREW_AUTO_UPDATE_SECS="60" + fi + # check permissions if [[ "$HOMEBREW_PREFIX" = "/usr/local" && ! -w /usr/local ]] then @@ -395,7 +400,7 @@ EOS if [[ -n "$HOMEBREW_UPDATE_PREINSTALL" ]] then # Skip taps checked/fetched recently - [[ -n "$(find "$DIR/.git/FETCH_HEAD" -type f -mtime -60s 2>/dev/null)" ]] && exit + [[ -n "$(find "$DIR/.git/FETCH_HEAD" -type f -mtime -"${HOMEBREW_AUTO_UPDATE_SECS}"s 2>/dev/null)" ]] && exit # Skip taps without formulae (but always update Homebrew/brew and Homebrew/homebrew-core) if [[ "$DIR" != "$HOMEBREW_REPOSITORY" && |
