Last active
January 9, 2018 08:41
-
-
Save T1T4N/913f8dcc7ca69536a96c572f12e3d377 to your computer and use it in GitHub Desktop.
brew update all packages by temporary unpinning
This file contains 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
# cd /usr/local/Homebrew | |
# brew update && git stash pop | |
# BREW_PINNED=$(brew list --pinned | sort | tr '\n' ' ') sh -c '_cleanup() { brew cleanup && brew cask cleanup && brew pin $BREW_PINNED; }; trap _cleanup INT; echo "Pinned: $BREW_PINNED"; brew unpin $BREW_PINNED; brew upgrade; _cleanup' | |
#OR | |
(BREW_PINNED=($(brew list --pinned | sort | tr '\n' ' ')); function _cleanup() { brew cleanup && brew cask cleanup; brew pin "$BREW_PINNED[@]"; }; trap _cleanup INT; echo "Pinned: $BREW_PINNED"; brew unpin "$BREW_PINNED[@]"; brew upgrade; _cleanup) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment