dvm: use standard bash_completion.install
Also replace `brew --prefix` call with fixed path in the remainder of caveats.
This commit is contained in:
parent
3a04720996
commit
f105b1d2ad
1 changed files with 2 additions and 7 deletions
|
@ -28,7 +28,7 @@ class Dvm < Formula
|
|||
|
||||
system "make", "VERSION=#{version}", "UPGRADE_DISABLED=true"
|
||||
prefix.install "dvm.sh"
|
||||
prefix.install "bash_completion"
|
||||
bash_completion.install "bash_completion" => "dvm"
|
||||
(prefix/"dvm-helper").install "dvm-helper/dvm-helper"
|
||||
prefix.install_metafiles
|
||||
end
|
||||
|
@ -37,12 +37,7 @@ class Dvm < Formula
|
|||
def caveats; <<-EOS.undent
|
||||
dvm is a shell function, and must be sourced before it can be used.
|
||||
Add the following command to your bash profile:
|
||||
|
||||
[[ -s "$(brew --prefix dvm)/dvm.sh" ]] && source "$(brew --prefix dvm)/dvm.sh"
|
||||
|
||||
To enable tab completion of commands, add the following command to your bash profile:
|
||||
[[ -s "$(brew --prefix dvm)/bash_completion" ]] && source "$(brew --prefix dvm)/bash_completion"
|
||||
|
||||
[ -f #{opt_prefix}/dvm.sh ] && . #{opt_prefix}/dvm.sh
|
||||
EOS
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue