2014-05-26 05:15:10 +00:00
|
|
|
class Cheat < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Create and view interactive cheat sheets for *nix commands"
|
2014-05-26 05:15:10 +00:00
|
|
|
homepage "https://github.com/chrisallenlane/cheat"
|
2016-06-20 17:40:40 +00:00
|
|
|
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
|
2016-06-20 17:40:40 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz"
|
2015-06-27 17:52:00 +00:00
|
|
|
sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"
|
2014-05-26 05:15:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "Pygments" do
|
2016-06-20 17:40:40 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/b8/67/ab177979be1c81bc99c8d0592ef22d547e70bb4c6815c383286ed5dec504/Pygments-2.1.3.tar.gz"
|
2016-04-25 05:33:55 +00:00
|
|
|
sha256 "88e4c8a91b2af5962bfa5ea2447ec6dd357018e86e94c7d14bd8cacbc5b55d81"
|
2014-05-26 05:15:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2016-06-20 17:40:40 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
2014-07-19 00:11:44 +00:00
|
|
|
resources.each do |r|
|
2016-06-20 17:40:40 +00:00
|
|
|
r.stage do
|
|
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
|
|
end
|
2014-05-26 05:15:10 +00:00
|
|
|
end
|
|
|
|
|
2016-06-20 17:40:40 +00:00
|
|
|
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"
|
|
|
|
|
2016-06-20 17:40:40 +00:00
|
|
|
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
|
2016-06-20 17:40:40 +00:00
|
|
|
system bin/"cheat", "tar"
|
2014-05-26 05:15:10 +00:00
|
|
|
end
|
|
|
|
end
|