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