homebrew-core/Formula/tmpwatch.rb
2015-06-05 14:47:57 +01:00

27 lines
869 B
Ruby

class Tmpwatch < Formula
desc "Find and remove files not accessed in a specified time"
homepage "https://fedorahosted.org/tmpwatch/"
url "https://fedorahosted.org/releases/t/m/tmpwatch/tmpwatch-2.11.tar.bz2"
sha1 "c578dd98e5ea64ad987a95ae55926685a0df0659"
bottle do
cellar :any
sha1 "4afc50b010310169a0bd37dac99df9e2b44370c6" => :yosemite
sha1 "8eef5be45661363ee34a791f1f331ba519f4d9b4" => :mavericks
sha1 "079eb69792c8a9de70cb02eaebe0c77642b7d18b" => :mountain_lion
end
def install
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make", "install"
end
test do
touch %w[a b c]
ten_minutes_ago = Time.new - 600
File.utime(ten_minutes_ago, ten_minutes_ago, "a")
system "#{sbin}/tmpwatch", "2m", testpath
assert_equal %w[b c], Dir["*"]
end
end