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