diff options
| author | Martin Afanasjew | 2016-01-21 16:39:57 +0100 |
|---|---|---|
| committer | Martin Afanasjew | 2016-01-26 16:26:08 +0100 |
| commit | 77975168e0f2d5e6627d049d6055bc159e3fd89d (patch) | |
| tree | c593a707325e675eec1a2bdc7a39d433bdd6c645 | |
| parent | da47ca921350b6c21a7a9eede63a6f61ddc8b150 (diff) | |
| download | brew-77975168e0f2d5e6627d049d6055bc159e3fd89d.tar.bz2 | |
bin/brew: add support for developer bash commands
This also means `bin/brew` is again consistent with `brew command` and
`brew commands`.
| -rwxr-xr-x | bin/brew | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -135,7 +135,11 @@ then fi HOMEBREW_COMMAND="$1" -HOMEBREW_BASH_COMMAND="$HOMEBREW_LIBRARY/Homebrew/cmd/$1.sh" +if [[ -f "$HOMEBREW_LIBRARY/Homebrew/cmd/$HOMEBREW_COMMAND.sh" ]] ; then + HOMEBREW_BASH_COMMAND="$HOMEBREW_LIBRARY/Homebrew/cmd/$HOMEBREW_COMMAND.sh" +elif [[ -n "$HOMEBREW_DEVELOPER" && -f "$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh" ]] ; then + HOMEBREW_BASH_COMMAND="$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh" +fi if [[ "$(id -u)" = "0" && "$(stat -f%u "$HOMEBREW_BREW_FILE")" != "0" ]] then @@ -151,7 +155,7 @@ EOS esac fi -if [[ -f "$HOMEBREW_BASH_COMMAND" ]] +if [[ -n "$HOMEBREW_BASH_COMMAND" ]] then # Bash commands don't need the first argument, which is just the command name. shift |
