forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (37 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
class BashCompletionAT2 < Formula
desc "Programmable completion for Bash 4.1+"
homepage "https://github.com/scop/bash-completion"
url "https://github.com/scop/bash-completion/releases/download/2.8/bash-completion-2.8.tar.xz"
sha256 "c01f5570f5698a0dda8dc9cfb2a83744daa1ec54758373a6e349bd903375f54d"
bottle do
cellar :any_skip_relocation
rebuild 1
sha256 "4377303d2f57e4fd4887201a15c6ffe9e41e0636b8b83cf7a4a53ce76f85a5e7" => :mojave
sha256 "ae0fd1bc4b23207417f5d070eeedb4d3158cc170dcf9c84f04c23fe479c219dc" => :high_sierra
sha256 "ae0fd1bc4b23207417f5d070eeedb4d3158cc170dcf9c84f04c23fe479c219dc" => :sierra
end
head do
url "https://github.com/scop/bash-completion.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
end
depends_on "bash"
conflicts_with "bash-completion", :because => "Differing version of same formula"
def install
inreplace "bash_completion", "readlink -f", "readlink"
system "autoreconf", "-i" if build.head?
system "./configure", "--prefix=#{prefix}"
ENV.deparallelize
system "make", "install"
end
def caveats; <<~EOS
Add the following to your ~/.bash_profile:
[[ -r "#{etc}/profile.d/bash_completion.sh" ]] && . "#{etc}/profile.d/bash_completion.sh"
If you'd like to use existing homebrew v1 completions, add the following before the previous line:
export BASH_COMPLETION_COMPAT_DIR="/usr/local/etc/bash_completion.d"
EOS
end
test do
system "test", "-f", "#{share}/bash-completion/bash_completion"
end
end