Almost all of these two scripts are identical. Refactor out the common
bits, saving over 60 lines of repetition.
Right now this is handled by moving all the logic into "develop_brew_cask"
and symlinking "production_brew_cask".
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.
global replace of:
'phinze/homebrew-cask' -> 'caskroom/homebrew-cask'
'phinze/cask' -> 'caskroom/cask'
'phinze/homebrew-testcasks' -> 'caskroom/homebrew-testcasks'
and various other specific places that needed updates
<3 the homebrew-cask community!
- markdown docs were intentionally held back from prior PR to avoid
merge conflict
- add -help usage notes to all scripts
- add sanity check against user running develop_brew_cask inside
/usr/local/Library/Taps/phinze-cask/developer/bin and better explain that
- note everywhere that "brew update" is not safe when in "development mode"