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-02-18 18:46:37 +00:00
|
|
|
url "https://github.com/chrisallenlane/cheat/archive/2.1.22.tar.gz"
|
|
|
|
sha256 "48df9b920260bee35bd5cdde83bb51e958d9278416141a64e1f46a3981ccb454"
|
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-02-18 18:59:36 +00:00
|
|
|
sha256 "9ae7262046f5b657043b2eaf158d7e41171c7328eeb0c9f88c8dbea670bd50a3" => :el_capitan
|
|
|
|
sha256 "da3f145ba253b64a440920f3c1121191d2ddfac4aa5f95c745daae5007f3d11e" => :yosemite
|
|
|
|
sha256 "e0e6288ba060680e0f56a917328af07103e628030e9d11733329f5583b38ffd5" => :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
|
2014-12-11 07:05:34 +00:00
|
|
|
url "https://pypi.python.org/packages/source/d/docopt/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-02-18 18:46:37 +00:00
|
|
|
url "https://pypi.python.org/packages/source/P/Pygments/Pygments-2.1.1.tar.gz"
|
|
|
|
sha256 "2df7d9a85b56e54c7c021dc98fc877bd216ead652c10da170779c004fb59c01b"
|
2014-05-26 05:15:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV["PYTHONPATH"] = lib+"python2.7/site-packages"
|
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec+"lib/python2.7/site-packages"
|
|
|
|
|
2014-07-19 00:11:44 +00:00
|
|
|
resources.each do |r|
|
2014-12-11 07:05:34 +00:00
|
|
|
r.stage { system "python", *Language::Python.setup_install_args(libexec) }
|
2014-05-26 05:15:10 +00:00
|
|
|
end
|
|
|
|
|
2014-12-11 07:05:34 +00:00
|
|
|
system "python", *Language::Python.setup_install_args(prefix)
|
2014-05-26 05:15:10 +00:00
|
|
|
|
|
|
|
bash_completion.install "cheat/autocompletion/cheat.bash"
|
|
|
|
zsh_completion.install "cheat/autocompletion/cheat.zsh" => "_cheat"
|
|
|
|
|
|
|
|
bin.env_script_all_files(libexec+"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/cheat", "tar"
|
|
|
|
end
|
|
|
|
end
|