Skip to content

Instantly share code, notes, and snippets.

@josephmidura
Last active March 19, 2025 21:11
Show Gist options
  • Save josephmidura/807770766aeb37b9cc3897e26f870210 to your computer and use it in GitHub Desktop.
Save josephmidura/807770766aeb37b9cc3897e26f870210 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Update homebrew
CYAN=$(tput setaf 6)
RESET=$(tput sgr0)
echo "${CYAN}Updating homebrew and local base of available packages and versions...${RESET}"
brew update
echo "${CYAN}Upgrading outdated homebrew packages...${RESET}"
brew upgrade
echo "${CYAN}Cleaning cache of unfinished downloads...${RESET}"
brew cleanup
echo "${CYAN}Checking for issues...${RESET}"
brew doctor
@qns7
Copy link

qns7 commented May 28, 2024

Awesome, thank you!

In my case it was the .zprofile (on macOS Sonoma) and this did it. :)

I remembered the steps from Linux while following your steps, but that's years ago and I wouldn't have remembered it without your help:
I basically added 'username/bin' as a global callable directory by following your steps, so that I can call the script (scripts in general which are in any directoty listed in " echo "$PATH" | tr : '\n' ") from everywhere just by writing brewup. Right?

So again: Thank you. :)

Best regards Q

@josephmidura
Copy link
Author

josephmidura commented May 29, 2024

I'm glad it worked and it sounds like you're on the right track with calling scripts from directories in your $PATH.

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