homebrew-core/Formula/cheat.rb

49 lines
1.9 KiB
Ruby
Raw Normal View History

2014-05-26 05:15:10 +00:00
class Cheat < Formula
desc "Create and view interactive cheat sheets for *nix commands"
2014-05-26 05:15:10 +00:00
homepage "https://github.com/chrisallenlane/cheat"
url "https://github.com/chrisallenlane/cheat/archive/2.1.25.tar.gz"
sha256 "3627da400caebe5a813aec4f76f4d0999d4ed80d4eff0023f6e1a2a2de016e2f"
2014-05-26 05:15:10 +00:00
head "https://github.com/chrisallenlane/cheat.git"
2014-06-05 14:11:37 +00:00
bottle do
2015-09-23 08:40:36 +00:00
cellar :any_skip_relocation
2016-06-20 17:46:53 +00:00
sha256 "9837962b7701531cb48670dedd9e8468deb1439f63ad5c1e6b6e31bd4522075d" => :el_capitan
sha256 "f796ed1abd758afd365f4eab473169d051a0e97a58662f57b1459f729138c0dc" => :yosemite
sha256 "5539d5048c4d371ead16e7783d591220ca33728cdcead2e661aeb55022b6eee0" => :mavericks
2014-06-05 14:11:37 +00:00
end
2014-05-26 05:15:10 +00:00
depends_on :python if MacOS.version <= :snow_leopard
resource "docopt" do
url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz"
sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"
2014-05-26 05:15:10 +00:00
end
resource "Pygments" do
url "https://files.pythonhosted.org/packages/b8/67/ab177979be1c81bc99c8d0592ef22d547e70bb4c6815c383286ed5dec504/Pygments-2.1.3.tar.gz"
sha256 "88e4c8a91b2af5962bfa5ea2447ec6dd357018e86e94c7d14bd8cacbc5b55d81"
2014-05-26 05:15:10 +00:00
end
def install
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
2014-07-19 00:11:44 +00:00
resources.each do |r|
r.stage do
system "python", *Language::Python.setup_install_args(libexec/"vendor")
end
2014-05-26 05:15:10 +00:00
end
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
system "python", *Language::Python.setup_install_args(libexec)
2014-05-26 05:15:10 +00:00
bash_completion.install "cheat/autocompletion/cheat.bash"
zsh_completion.install "cheat/autocompletion/cheat.zsh" => "_cheat"
bin.install Dir[libexec/"bin/*"]
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
2014-05-26 05:15:10 +00:00
end
test do
system bin/"cheat", "tar"
2014-05-26 05:15:10 +00:00
end
end