2011-03-10 05:11:03 +00:00
|
|
|
class Fmdiff < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Use FileMerge as a diff command for Subversion and Mercurial"
|
2015-03-12 23:44:34 +00:00
|
|
|
homepage "https://www.defraine.net/~brunod/fmdiff/"
|
2015-09-16 08:52:21 +00:00
|
|
|
url "https://github.com/brunodefraine/fmscripts/archive/20150915.tar.gz"
|
|
|
|
sha256 "45ead0c972aa8ff5b3f9cf1bcefbc069931fd8218b2e28ff76958437a3fabf96"
|
|
|
|
head "https://github.com/brunodefraine/fmscripts.git"
|
2012-02-07 02:49:34 +00:00
|
|
|
|
2015-03-19 11:07:54 +00:00
|
|
|
bottle do
|
2016-03-20 06:41:33 +00:00
|
|
|
revision 1
|
|
|
|
sha256 "ba9108d500e3cf771c1f1b0430d7fe92c3e5743265dc001c1dbd70d260fbbd7a" => :el_capitan
|
|
|
|
sha256 "11aa1ef52e2f54cc99f5ad2587d204bc83e9f08aa5eb2823f2831376e8b53846" => :yosemite
|
|
|
|
sha256 "9905051e6b7fea4e23e0c9a1adedae94e6a52c0f471a955a532320849fd8ae18" => :mavericks
|
2015-03-19 11:07:54 +00:00
|
|
|
end
|
|
|
|
|
2016-03-20 03:12:42 +00:00
|
|
|
# Needs FileMerge.app, which has been part of Xcode since Xcode 4 (OS X 10.7)
|
|
|
|
# Prior to that it was included in the Developer Tools package.
|
|
|
|
# "make" has logic for checking both possibilities.
|
|
|
|
depends_on :xcode if MacOS.version >= :lion
|
|
|
|
|
2011-03-11 15:41:55 +00:00
|
|
|
def install
|
2015-03-12 23:44:34 +00:00
|
|
|
system "make"
|
|
|
|
system "make", "DESTDIR=#{bin}", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
ENV.prepend_path "PATH", testpath
|
|
|
|
|
|
|
|
# dummy filemerge script
|
|
|
|
(testpath/"filemerge").write <<-EOS.undent
|
|
|
|
#!/bin/sh
|
|
|
|
echo "it works"
|
|
|
|
EOS
|
|
|
|
|
|
|
|
chmod 0744, testpath/"filemerge"
|
|
|
|
touch "test"
|
|
|
|
|
|
|
|
assert_match(/it works/, shell_output("#{bin}/fmdiff test test"))
|
2011-03-11 15:41:55 +00:00
|
|
|
end
|
|
|
|
end
|