diff options
| author | Fabian Frank | 2015-03-06 15:23:05 -0800 |
|---|---|---|
| committer | Mike McQuaid | 2015-03-10 08:45:40 +0000 |
| commit | da3390bb387ef6ed4eba45d859bb0155d9e7a487 (patch) | |
| tree | 80dce341fcf926963c1f18acebc6b2c22240c881 /Library/Formula/sqlite-analyzer.rb | |
| parent | 44f61c69ea8a223750acb6f2892961a46debcea7 (diff) | |
| download | homebrew-da3390bb387ef6ed4eba45d859bb0155d9e7a487.tar.bz2 | |
sqlite-analyzer 3.8.8.3 (new formula)
Not adding as an option to sqlite, because sqlite is built from the amalgamation
and the amalgamation does not include sqlite_analyzer. Since the sqlite project
highly recommends building from the amalgamation, don't want to risk moving away
from it for the subset of people that need the analyzer.
Closes #37551.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula/sqlite-analyzer.rb')
| -rw-r--r-- | Library/Formula/sqlite-analyzer.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Library/Formula/sqlite-analyzer.rb b/Library/Formula/sqlite-analyzer.rb new file mode 100644 index 000000000..852e2c33a --- /dev/null +++ b/Library/Formula/sqlite-analyzer.rb @@ -0,0 +1,25 @@ +class SqliteAnalyzer < Formula + homepage "https://www.sqlite.org/" + url "https://www.sqlite.org/2015/sqlite-src-3080803.zip" + version "3.8.8.3" + sha256 "790ff6be164488d176b3bed7e0e0850bac1567a4011381307685d48eb69fab48" + + def install + system "./configure", "--disable-debug", "--prefix=#{prefix}" + system "make", "sqlite3_analyzer" + bin.install "sqlite3_analyzer" + end + + test do + dbpath = testpath/"school.sqlite" + sqlpath = testpath/"school.sql" + sqlpath.write <<-EOS.undent + create table students (name text, age integer); + insert into students (name, age) values ('Bob', 14); + insert into students (name, age) values ('Sue', 12); + insert into students (name, age) values ('Tim', 13); + EOS + system "/usr/bin/sqlite3 #{dbpath} < #{sqlpath}" + system "#{bin}/sqlite3_analyzer", dbpath + end +end |
