aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/tmpwatch.rb
blob: 5686194844899650813f87ce669f3ee1103ddb3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
class Tmpwatch < Formula
  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