homebrew-core/Formula/fdupes.rb

23 lines
515 B
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Fdupes < Formula
homepage 'http://code.google.com/p/fdupes/'
url 'https://fdupes.googlecode.com/files/fdupes-1.51.tar.gz'
sha1 '8276b39026f57a2f9503d7af18efca0a7d42b8ec'
def install
inreplace "Makefile", "gcc", "#{ENV.cc} #{ENV.cflags}"
system "make fdupes"
bin.install "fdupes"
man1.install "fdupes.1"
end
test do
touch "a"
touch "b"
2014-05-04 19:12:41 +00:00
dupes = shell_output("#{bin}/fdupes .").strip.split("\n").sort
assert_equal ["./a", "./b"], dupes
end
end