Skip to content

Instantly share code, notes, and snippets.

@otzoran
Last active October 1, 2021 11:30
Show Gist options
  • Select an option

  • Save otzoran/0214f5f9e817c54c597da31dd86c9162 to your computer and use it in GitHub Desktop.

Select an option

Save otzoran/0214f5f9e817c54c597da31dd86c9162 to your computer and use it in GitHub Desktop.
Automate brew update
#!/usr/bin/env bash
set -ex
brew update
printf "\n\n=====\n\n"
brew upgrade --formula
# upd 2020-11-05
pkk=$(brew outdated --cask --greedy --quiet | grep -v android-file-transfer)
if [[ -n $pkk ]]; then
printf "outdated:\n$pkk\n"
brew fetch --cask $pkk
printf "installing:\n$pkk\n"
# 2021-01 upd switch
brew reinstall --cask $pkk
fi
printf "\n\n===== updated formula:\n$fm\n"
printf "\n\n===== updated casks:\n$ck\n"
@otzoran
Copy link
Copy Markdown
Author

otzoran commented Oct 1, 2021

added trap

@otzoran
Copy link
Copy Markdown
Author

otzoran commented Oct 1, 2021

add curl to download it => xx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment