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"
|
2015-06-27 17:52:00 +00:00
|
|
|
url "https://github.com/chrisallenlane/cheat/archive/2.1.9.tar.gz"
|
|
|
|
sha256 "58e4bc81a29d1ca659430c5bced6aaba836a023c55a265561c1a51af44fdce3c"
|
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
|
|
|
|
cellar :any
|
2015-06-27 18:04:00 +00:00
|
|
|
sha256 "8714e9f07442f4fc5eb68bfcdb874e7dc272a69eb1a35a1dd863c1a2f7ba6831" => :yosemite
|
|
|
|
sha256 "b309758b2d56b9b905bf324aa58f3754084ef3b1b912af405a860fc92ddb3657" => :mavericks
|
|
|
|
sha256 "59ab95aa1ea9d4dd2ce2f9b934cf96edda4ce48132e929263752add723b5c28f" => :mountain_lion
|
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
|
2015-02-21 16:13:50 +00:00
|
|
|
url "https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.2.tar.gz"
|
2015-06-27 17:52:00 +00:00
|
|
|
sha256 "7320919084e6dac8f4540638a46447a3bd730fca172afc17d2c03eed22cf4f51"
|
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
|