Homebrew Functions - mvaltas/grind GitHub Wiki

The brew functions is a set of shortcuts for interacting with homebrew

Usage

At your definition file start by requiring brew like so:

use "brew"

Functions

brew_pkg

Installs a homebrew package if is not already installed.

use "brew"
brew_pkg "vim"

This is equivalent of writing:

do_run "brew install vim"
  unless "brew list --versions vim &> /dev/null"

brew_cask

Install a homebrew cask if it is not already installed.

use "brew"
brew_cask "hipchat"

This is equivalent of writing:

do_run "brew install --cask hipchat"
  unless "brew list --cask hipchat &> /dev/null"