osx

Using homebrew and cask package managers in OSX

Homebrew is a package management system for OSX. It installs packages in its own cellar directory and symblinkes to /usr/local.

Homebrew terminology: Formula is the package definition, keg is formula installation prefix, cellar is where all kegs are installed, tap is optional formula repositories, bottle is pre-built binary keg that can be unpacked.

## install
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew --version

## using
# update formulas
$ brew update
# install/uninstall/upgrade/info/search packages
$ brew install|uninstall|upgrade|info|search "package"
# list installed
$ brew list

## contributing
# forked https://github.com/Homebrew/homebrew and clone
$ git clone https://github.com/<username>/homebrew.git
# create new formula
$ brew create https://foo.com/bar-1.0.tgz
$ vi $HOMEBREW_REPOSITORY/Library/Formula/foo.rb
$ git checkout -b foo
$ git commit Library/Formula/foo.rb && git push
# open pull request

## using tap, optional repository git formulas
$ brew tap homebrew/science
$ brew install "formula"

from homebrew, formula cookbook, brew tap and interesting taps and branches

Homebrew cask extends homebrew and brings its elegance, simplicity, and speed to OS X applications and large binaries alike. Applications are kept in their Caskroom under /opt and symblinked to $HOME/Applications.

## install
$ brew install caskroom/cask/brew-cask

## using
$ brew cask install google-chrome
$ open ~/Applications/"Google Chrome.app"

## contributing
# forked https://github.com/caskroom/homebrew-cask/fork and clone
$ git clone https://github.com//homebrew-cask.git
# add official repo as remote
$ git remote add upstream https://github.com/caskroom/homebrew-cask.git
# symb link to use brew cask in your private repo
$ $HOME/homebrew-cask/developer/bin/develop_brew_cask
# switch back to official repo to run 'brew update'
$ $HOME/homebrew-cask/developer/bin/production_brew_cask

from homebrew cask and hacking on homebrew-cask