Skip to content

Instantly share code, notes, and snippets.

@BrianHicks
Created February 22, 2017 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrianHicks/20d2a313906adc14dd21d3544ffef0fb to your computer and use it in GitHub Desktop.
Save BrianHicks/20d2a313906adc14dd21d3544ffef0fb to your computer and use it in GitHub Desktop.
# install something from homebrew
param "package" {}
task "install-homebrew" {
check = "which brew && echo brew installed || (echo brew not installed && exit 1)"
apply = "/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\""
}
task "install" {
check = "brew list | grep -E '^{{param `package`}}$'"
apply = "brew install {{param `package`}}"
group = "brew-install"
depends = ["task.install-homebrew"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment