Skip to content

Instantly share code, notes, and snippets.

@RafahCSilva
Last active January 21, 2025 23:51
Show Gist options
  • Select an option

  • Save RafahCSilva/ad002da454d374260d1c086767ea7a2b to your computer and use it in GitHub Desktop.

Select an option

Save RafahCSilva/ad002da454d374260d1c086767ea7a2b to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
echo "UPDATING BREW..." && \
echo "entre a senha 2 vezes:" && \
sudo mkdir -p $(brew --caskroom) $(brew --cellar) && \
sudo chown -R $(whoami) $(brew --caskroom) $(brew --cellar) && \
echo "=====> BREW UPDATE " && \
brew update && \
echo "=====> BREW UPGRADE " && \
brew upgrade --force && \
echo "=====> BREW CASK UPGRADE" && \
brew upgrade --cask --force && \
echo "=====> BREW CLEANUP" && \
(brew doctor || echo "brew doctor warnings") && \
brew autoremove && \
brew cleanup --prune=all && \
du -d 1 -h $(brew --cache) && \
echo "=====> BREW LISTING" && \
echo "==> BREW LIST:" >~/BREW_LIST.txt && \
brew list --versions >>~/BREW_LIST.txt && \
echo "==> BREW CASK LIST:" >>~/BREW_LIST.txt && \
brew list --cask --versions >>~/BREW_LIST.txt && \
echo "=====> BREW DUMP" && rm ~/Brewfile && brew bundle dump && \
(
open https://gist.github.com/RafahCSilva/???
code ~/BREW_LIST.txt
code ~/Brewfile
) && \
echo "UPDATE SUCCESS!!!" || echo "!!! ==== UPDATE FAAAIIILLLLLLLL ==== !!!"
#(test -d /Volumes/GoogleDrive/Meu\ Drive/ && cp -f ~/BREW_LIST.txt /Volumes/GoogleDrive/Meu\ Drive/BREW_LIST.txt || echo "GoogleDrive Offline" ) && \
#!/usr/bin/env bash
# OS Update
softwareupdate --all --install --force
# XCode
# sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
# MS Office
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" --install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment