From 0c6e307eef57c48d03e1213112d3edd597ce5a7b Mon Sep 17 00:00:00 2001
From: Mike McQuaid <mike@mikemcquaid.com>
Date: Wed, 10 Aug 2016 14:18:39 +0100
Subject: [PATCH] update.sh: all configurable HOMEBREW_AUTO_UPDATE_SECS.

---
 Library/Homebrew/cmd/update.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index 3fa5ba1fb6..d622352a22 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" &&
-- 
GitLab