Skip to content

Instantly share code, notes, and snippets.

@farmerbean
Created October 4, 2023 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save farmerbean/b99a246f3adeffb45a522e67381b9c96 to your computer and use it in GitHub Desktop.
Save farmerbean/b99a246f3adeffb45a522e67381b9c96 to your computer and use it in GitHub Desktop.
brew updates
#!/usr/bin/env/bash
# { crontab -l; echo "@daily $HOME/brew_update.sh"; } | crontab -heart 1
set -euo pipefail
BREW_CACHE_DIR=$(brew --cache)
brew update --verbose
if brew outdated | grep -q terragrunt; then
# Hack to play nice with tfenv
brew uninstall terragrunt && brew install terragrunt --ignore-dependencies
fi
brew upgrade
brew upgrade --cask --greedy
brew cleanup
rm -rfv "${BREW_CACHE_DIR:?}/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment