Permalink
Browse files

Improve messaging around brew util

Add useful success messages and improve the headings for each step.
  • Loading branch information...
1 parent 2965a1a commit 04643fc9b5677a91907eb0f70b8f17577caff5f9 @necolas committed Oct 26, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 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

0 comments on commit 04643fc

Please sign in to comment.