4d57649235
Closes Homebrew/homebrew#38832. Signed-off-by: Brett Koonce <koonce@gmail.com>
20 lines
523 B
Ruby
20 lines
523 B
Ruby
require "formula"
|
|
|
|
class Pgformatter < Formula
|
|
homepage "http://sqlformat.darold.net/"
|
|
url "https://github.com/darold/pgFormatter/archive/v1.4.tar.gz"
|
|
sha1 "bdbeefd9b3d8088a69816d3f578453c4a886feae"
|
|
|
|
def install
|
|
system "perl", "Makefile.PL", "DESTDIR=."
|
|
system "make", "install"
|
|
bin.install "blib/script/pg_format"
|
|
man1.install "blib/man1/pg_format.1"
|
|
end
|
|
|
|
test do
|
|
test_file = (testpath/'test.sql')
|
|
test_file.write('SELECT * FROM foo')
|
|
system "#{bin}/pg_format", test_file
|
|
end
|
|
end
|