Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve messaging around brew util

Add useful success messages and improve the headings for each step.
  • Loading branch information...
commit 04643fc9b5677a91907eb0f70b8f17577caff5f9 1 parent 2965a1a
Nicolas Gallagher authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 lib/brew
9 lib/brew
View
@@ -7,12 +7,14 @@ run_brew() {
e_header "Updating Homebrew..."
# Use the latest version of Homebrew
brew update
+ [[ $? ]] && e_success "Done"
- e_header "Updating Homebrew formulae..."
+ e_header "Updating any existing Homebrew formulae..."
# Upgrade any already-installed formulae
brew upgrade
+ [[ $? ]] && e_success "Done"
- e_header "Installing Homebrew formulae..."
+ e_header "Checking status of desired Homebrew formulae..."
local list_formulae
local -a missing_formulae
local -a desired_formulae=(
@@ -41,8 +43,11 @@ run_brew() {
# Convert the array of missing formula into a list of space-separate strings
list_formulae=$( printf "%s " "${missing_formulae[@]}" )
+ e_header "Installing missing Homebrew formulae..."
# Install all missing formulae
brew install $list_formulae
+
+ [[ $? ]] && e_success "Done"
fi
# Remove outdated versions from the Cellar
Please sign in to comment.
Something went wrong with that request. Please try again.