2014-03-17 13:26:01 +00:00
|
|
|
class Fsw < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "File change monitor with multiple backends"
|
2015-07-10 20:54:51 +00:00
|
|
|
homepage "https://emcrisostomo.github.io/fsw/"
|
2015-01-27 13:29:26 +00:00
|
|
|
url "https://github.com/emcrisostomo/fsw/releases/download/1.3.9/fsw-1.3.9.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "9222f76f99ef9841dc937a8f23b529f635ad70b0f004b9dd4afb35c1b0d8f0ff"
|
2014-03-17 13:26:01 +00:00
|
|
|
|
2015-01-27 13:43:25 +00:00
|
|
|
bottle do
|
2016-04-17 06:42:55 +00:00
|
|
|
cellar :any_skip_relocation
|
|
|
|
revision 1
|
|
|
|
sha256 "3d02fa0e6e8a6f9518341fc3934e7b53e13ac42304b07b7088ce54384ed64371" => :el_capitan
|
|
|
|
sha256 "2a439435d39ddd9a8c1bb978ae7ebb25415fd7a3d0c7079e6a731ecbbf035f68" => :yosemite
|
|
|
|
sha256 "00c166987eea6babaeb7eb8005de6ae8418c18681474e534a9feeac65700d95d" => :mavericks
|
2015-01-27 13:43:25 +00:00
|
|
|
end
|
|
|
|
|
2014-03-17 13:26:01 +00:00
|
|
|
def install
|
2014-04-20 17:56:36 +00:00
|
|
|
ENV.append "CXXFLAGS", "-stdlib=libc++"
|
2014-03-17 13:26:01 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--disable-silent-rules",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2016-04-16 17:46:32 +00:00
|
|
|
begin
|
|
|
|
io = IO.popen("fsw test")
|
|
|
|
(testpath/"test").write("foo")
|
|
|
|
sleep 2
|
|
|
|
rm testpath/"test"
|
|
|
|
sleep 2
|
|
|
|
(testpath/"test").write("foo")
|
|
|
|
sleep 2
|
|
|
|
assert_equal File.expand_path("test"), io.gets.strip
|
|
|
|
ensure
|
|
|
|
Process.kill "INT", io.pid
|
|
|
|
Process.wait io.pid
|
|
|
|
end
|
2014-03-17 13:26:01 +00:00
|
|
|
end
|
|
|
|
end
|