diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/pgformatter.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Library/Formula/pgformatter.rb b/Library/Formula/pgformatter.rb new file mode 100644 index 000000000..6b90db5c1 --- /dev/null +++ b/Library/Formula/pgformatter.rb @@ -0,0 +1,20 @@ +require "formula" + +class Pgformatter < Formula + homepage "http://sqlformat.darold.net/" + url "https://downloads.sourceforge.net/project/pgformatter/1.2/pgFormatter-1.2.tar.gz" + sha1 "598c39fa7f3f511aa376e7a18457139a9393fe74" + + 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 |
