/
awscli.rb
42 lines (35 loc) 路 1.47 KB
/
awscli.rb
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
class Awscli < Formula
include Language::Python::Virtualenv
desc "Official Amazon AWS command-line interface"
homepage "https://aws.amazon.com/cli/"
url "https://github.com/aws/aws-cli/archive/1.11.138.tar.gz"
sha256 "ecc411a0db77694ef7a24853bef770ca1c9e54d747a1283599ea7a3a3c1478d0"
head "https://github.com/aws/aws-cli.git", :branch => "develop"
bottle do
cellar :any_skip_relocation
sha256 "48cbf9f3abbf9760e51c9d3892cec8c1ca2588801f53cc9889026724e64363dd" => :sierra
sha256 "101241628110514e406c68dfe07fb2b4bb9429e5b6b442fc629167fe9861a881" => :el_capitan
sha256 "68d17a28a5fd33854498073d05a388bec2a2dd60fa52bb6dafbde84daeece88a" => :yosemite
end
# Use :python on Lion to avoid urllib3 warning
# https://github.com/Homebrew/homebrew/pull/37240
depends_on :python if MacOS.version <= :lion
def install
venv = virtualenv_create(libexec)
system libexec/"bin/pip", "install", "-v", "--no-binary", ":all:",
"--ignore-installed", buildpath
system libexec/"bin/pip", "uninstall", "-y", "awscli"
venv.pip_install_and_link buildpath
pkgshare.install "awscli/examples"
bash_completion.install "bin/aws_bash_completer"
zsh_completion.install "bin/aws_zsh_completer.sh" => "_aws"
end
def caveats; <<-EOS.undent
The "examples" directory has been installed to:
#{HOMEBREW_PREFIX}/share/awscli/examples
EOS
end
test do
assert_match "topics", shell_output("#{bin}/aws help")
end
end