diff options
| author | Douglas Creager | 2010-08-19 17:49:33 -0400 |
|---|---|---|
| committer | Adam Vandenberg | 2010-08-19 14:54:54 -0700 |
| commit | c5fda55beba92c548c78ce16455870a0650ba0eb (patch) | |
| tree | aa673b47bdb7dfc00408f755b8918ed9df037066 | |
| parent | a0a1d73d845fcf83e8b01c65afe4820ab78fc76e (diff) | |
| download | homebrew-c5fda55beba92c548c78ce16455870a0650ba0eb.tar.bz2 | |
Include bash-completion rules for git-flow
bobthecow has some bash-completion rules for the git-flow toolset.
The formula now installs them. The rules are installed regardless of
whether bash-completion is installed; if you're not using
bash-completion, you'll just get an extra file lying around in
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
| -rw-r--r-- | Library/Formula/git-flow.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Library/Formula/git-flow.rb b/Library/Formula/git-flow.rb index 96667179a..11ce83007 100644 --- a/Library/Formula/git-flow.rb +++ b/Library/Formula/git-flow.rb @@ -1,5 +1,22 @@ +# -*- coding: utf-8 -*- require 'formula' +class GitFlowCompletion <Formula + url 'git://github.com/bobthecow/git-flow-completion.git', :tag => '0.3' + version '0.3' + head 'git://github.com/bobthecow/git-flow-completion.git', :branch => 'develop' + + def initialize + # We need to hard-code the formula name since Homebrew can't + # deduce it from the formula's filename, and the git download + # strategy really needs a valid name. + + super "git-flow-completion" + end + + homepage 'http://github.com/bobthecow/git-flow-completion' +end + class GitFlow <Formula url 'git://github.com/nvie/gitflow.git', :tag => '0.3' version '0.3' @@ -9,5 +26,19 @@ class GitFlow <Formula def install system "make", "prefix=#{prefix}", "install" + + # Normally, etc files are installed directly into HOMEBREW_PREFIX, + # rather than being linked from the Cellar — this is so that + # configuration files don't get clobbered when you update. The + # bash-completion file isn't really configuration, though; it + # should be updated when we upgrade the package. + + cellar_etc = prefix + 'etc' + bash_completion_d = cellar_etc + "bash_completion.d" + + completion = GitFlowCompletion.new + completion.brew do + bash_completion_d.install "git-flow-completion.bash" + end end end |
