Skip to content

Instantly share code, notes, and snippets.

@jzgdev
Last active September 20, 2018 06:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jzgdev/d3173701fb0e10a8dc67 to your computer and use it in GitHub Desktop.
Save jzgdev/d3173701fb0e10a8dc67 to your computer and use it in GitHub Desktop.
A simple command line utility to update and upgrade brew in one go. This is a simple script to work around my own personal annoyance with having to type 'brew update' and follow it up with 'brew upgrade', or even typing the somewhat length 'brew update && brew upgrade'.
#! /bin/sh
BREW=$(brew update)
if [ "$BREW" != "Already up-to-date." ];
then
/usr/local/bin/brew upgrade;
echo "brewup has succesfully updated remote homebrew repos and upgraded your local homebrew packages."
else
echo "$BREW"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment