aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2016-08-10 14:18:39 +0100
committerMike McQuaid2016-08-10 15:37:04 +0100
commit0c6e307eef57c48d03e1213112d3edd597ce5a7b (patch)
tree9ee138f474ca797e36a0d0d0c3a889424e41d561
parent1a240cd52a48a66e213706eba88055f6fd6b0f67 (diff)
downloadbrew-0c6e307eef57c48d03e1213112d3edd597ce5a7b.tar.bz2
update.sh: all configurable HOMEBREW_AUTO_UPDATE_SECS.
-rw-r--r--Library/Homebrew/cmd/update.sh7
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" &&