Created
March 28, 2014 02:02
-
-
Save edgurgel/9823561 to your computer and use it in GitHub Desktop.
WTH 0.0.3 formula
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "formula" | |
# https://github.com/Homebrew/homebrew/blob/master/Library/Formula/elixir.rb | |
class ErlangInstalled < Requirement | |
fatal true | |
default_formula 'erlang' | |
env :userpaths | |
satisfy { | |
erl = which('erl') and begin | |
`#{erl} -noshell -eval 'io:fwrite("~s~n", [erlang:system_info(otp_release)]).' -s erlang halt | grep -q '^R1[6789]'` | |
$?.exitstatus == 0 | |
end | |
} | |
def message; <<-EOS.undent | |
Erlang R16 is required to install. | |
You can install this with: | |
brew install erlang | |
Or you can use an official installer from: | |
http://www.erlang.org/ | |
EOS | |
end | |
end | |
class Wth < Formula | |
homepage "https//github.com/edgurgel/wth" | |
url "https://github.com/edgurgel/wth/releases/download/0.0.3/wth.tar.gz" | |
sha1 "64e837073b22258f0e7eb9dea994b483619d1dc1" | |
depends_on ErlangInstalled | |
def install | |
bin.install "wth" | |
end | |
test do | |
system "#{bin}/wth", "--help" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
brew install https://gist.githubusercontent.com/edgurgel/9823561/raw/be3f186d6fa04bf026dd6c54900faf223f00e439/wth.rb