homebrew-core/Formula/sqldiff.rb

30 lines
1.1 KiB
Ruby
Raw Normal View History

2016-09-26 08:57:59 +00:00
class Sqldiff < Formula
desc "Displays the differences between SQLite databases"
2016-09-26 08:57:59 +00:00
homepage "https://www.sqlite.org/sqldiff.html"
url "https://www.sqlite.org/2016/sqlite-src-3150000.zip"
version "3.15.0"
sha256 "c68a7064b1932aa8c40f9b1e644ab899771530e16d514ba4a065434666d4a3a2"
2016-09-26 08:57:59 +00:00
2016-10-03 19:44:42 +00:00
bottle do
cellar :any_skip_relocation
sha256 "de0d0f9add4b98bd62f94f37d6545a2a64a38ea018dd80839e29a39ca3f64a9e" => :sierra
sha256 "c464cbc13adb7a8fc4824810aee5ca8e7d0b10e9857a2e85f60e66871900f299" => :el_capitan
sha256 "4c2da93e7410f42a2c72634df29347b58141622fc3f4c863ae109015a812dfe6" => :yosemite
end
2016-09-26 08:57:59 +00:00
def install
system "./configure", "--disable-debug", "--prefix=#{prefix}"
system "make", "sqldiff"
bin.install "sqldiff"
end
test do
dbpath = testpath/"test.sqlite"
sqlpath = testpath/"test.sql"
sqlpath.write "create table test (name text);"
system "/usr/bin/sqlite3 #{dbpath} < #{sqlpath}"
assert_equal "test: 0 changes, 0 inserts, 0 deletes, 0 unchanged",
shell_output("#{bin}/sqldiff --summary #{dbpath} #{dbpath}").strip
2016-09-26 08:57:59 +00:00
end
end