caskroom/homebrew-cask — pull request #6187 by treyharris (2014-09-14 21:36:52+00:00)
Title: Refactor {develop,production}_brew_cask

Almost all of these two scripts are identical. Refactor out the common bits, saving over 60 lines of repetition.

All the code of both scripts was merged into `develop_brew_cask`, and `production_brew_cask` was symlinked back.

This will be followed by another patch to add a `manage_brew_cask_links` command to do the same with sub-commands, e.g., `manage_brew_cask_links status` returns `production` or `develop`, `manage_brew_cask_links production` does the same as `production_brew_cask`, `manage_brew_cask_links develop` does the same as `develop_brew_cask`, etc. At that point, I'd like to rename the script `manage_brew_cask_links` and have the two present names be symlinked to that.

This was motivated by (besides DRY) getting tired of having to manually check symlinks to see which state I was currently in.