2013-12-06 21:21:32 +00:00
|
|
|
class Entr < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Run arbitrary commands when files change"
|
2015-01-12 13:16:16 +00:00
|
|
|
homepage "http://entrproject.org/"
|
2015-04-21 19:13:37 +00:00
|
|
|
url "http://entrproject.org/code/entr-3.2.tar.gz"
|
|
|
|
mirror "https://bitbucket.org/eradman/entr/get/entr-3.2.tar.gz"
|
|
|
|
sha256 "b1eee00afbeccf03010c1c557436854be6aaf0ef9b72ab8d44b94affdd7d7146"
|
|
|
|
|
|
|
|
head do
|
|
|
|
url "https://bitbucket.org/eradman/entr", :using => :hg
|
|
|
|
depends_on :hg => :build
|
|
|
|
end
|
2013-12-06 21:21:32 +00:00
|
|
|
|
2014-03-20 15:07:57 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-04-21 19:30:17 +00:00
|
|
|
sha256 "abf6264e4dd04966320b6e2ed371e5c101a3c73e71102f988f5f30ab3aa26b9f" => :yosemite
|
|
|
|
sha256 "f2b9660db9526f88691d093b62fcd6c7361c582319fd8609dbd2786f3e1624c0" => :mavericks
|
|
|
|
sha256 "896090571a723c7f513e342967a7623bcf3cc0d70af5eabc473f8425c4037ef3" => :mountain_lion
|
2014-03-20 15:07:57 +00:00
|
|
|
end
|
|
|
|
|
2013-12-06 21:21:32 +00:00
|
|
|
def install
|
2015-01-12 13:16:16 +00:00
|
|
|
ENV["PREFIX"] = prefix
|
|
|
|
ENV["MANPREFIX"] = man
|
2013-12-06 21:21:32 +00:00
|
|
|
system "./configure"
|
|
|
|
system "make"
|
2015-01-12 13:16:16 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
touch testpath/"test.1"
|
|
|
|
fork do
|
|
|
|
sleep 0.5
|
|
|
|
touch testpath/"test.2"
|
|
|
|
end
|
2015-04-21 19:13:37 +00:00
|
|
|
assert_equal "New File", pipe_output("#{bin}/entr -p -d echo 'New File'", testpath).strip
|
2013-12-06 21:21:32 +00:00
|
|
|
end
|
|
|
|
end
|