Last active
October 1, 2021 11:30
-
-
Save otzoran/0214f5f9e817c54c597da31dd86c9162 to your computer and use it in GitHub Desktop.
Automate brew update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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" |
Author
Author
add curl to download it => xx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
added
trap