From cbabcbaf4bec1bc2c30a1b966e8c27694183f416 Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Tue, 26 Jan 2016 15:39:41 +0000 Subject: [PATCH] Ensure Homebrew is kept up to date on a regular basis. --- .bashrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.bashrc b/.bashrc index 84c9a82..1e56e01 100644 --- a/.bashrc +++ b/.bashrc @@ -114,4 +114,12 @@ if [ -z "${SSH_AUTH_SOCK}" -a -s "${PS1}" ]; then fi #-------------------------------------------------------------------------------- +#-------------------------------------------------------------------------------- +# Update brew once a day +#-------------------------------------------------------------------------------- +if [ -x /usr/local/bin/brew ]; then + find /usr/local/.git -name FETCH_HEAD -mtime +0 -exec brew update \; >> ~/var/log/brew-update.log 2>&1 & +fi +#-------------------------------------------------------------------------------- + [ -f ~/.bashrc_local ] && source ~/.bashrc_local