git-flow-avh: install to libexec
Create a wrapper script to set the gnu-getopt location and remove caveats.
This commit is contained in:
parent
52132e9c30
commit
b39af1615a
1 changed files with 6 additions and 7 deletions
|
@ -23,7 +23,12 @@ class GitFlowAvh < Formula
|
|||
conflicts_with 'git-flow'
|
||||
|
||||
def install
|
||||
system "make", "prefix=#{prefix}", "install"
|
||||
system "make", "prefix=#{libexec}", "install"
|
||||
(bin/'git-flow').write <<-EOS.undent
|
||||
#!/bin/bash
|
||||
export FLAGS_GETOPT_CMD=#{HOMEBREW_PREFIX}/opt/gnu-getopt/bin/getopt
|
||||
exec "#{libexec}/bin/git-flow" "$@"
|
||||
EOS
|
||||
|
||||
resource('completion').stage do
|
||||
bash_completion.install "git-flow-completion.bash"
|
||||
|
@ -31,12 +36,6 @@ class GitFlowAvh < Formula
|
|||
end
|
||||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
Create a ~/.gitflow_export file with the content
|
||||
export FLAGS_GETOPT_CMD="$(brew --prefix gnu-getopt)/bin/getopt"
|
||||
EOS
|
||||
end
|
||||
|
||||
test do
|
||||
system "#{bin}/git-flow", "version"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue