2017-11-15 23:49:01 +00:00
|
|
|
class Pspg < Formula
|
|
|
|
desc "Unix pager optimized for psql"
|
|
|
|
homepage "https://github.com/okbob/pspg"
|
2018-03-16 11:22:34 +00:00
|
|
|
url "https://github.com/okbob/pspg/archive/1.0.0.tar.gz"
|
|
|
|
sha256 "1035015f8fb29c749d5c1d023db0c391c79c2fa7180cfecdf788dd7e9c9a0fbc"
|
2017-11-15 23:49:01 +00:00
|
|
|
head "https://github.com/okbob/pspg.git"
|
|
|
|
|
2017-12-14 15:10:20 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2018-03-16 11:48:23 +00:00
|
|
|
sha256 "e61513e3232835b661761a4143e71d74ab3b1ad59ff5b5e44d8fc8512049930e" => :high_sierra
|
|
|
|
sha256 "000505b737172b0a55cd9b429c6080fa43987c9a7e2991f03cd0276432b99905" => :sierra
|
|
|
|
sha256 "4d84ee7f6369b4c215487d1d7e3281040be599bd261100c6fd99bbe94a36f374" => :el_capitan
|
2017-12-14 15:10:20 +00:00
|
|
|
end
|
|
|
|
|
2017-11-15 23:49:01 +00:00
|
|
|
depends_on "ncurses"
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<~EOS
|
|
|
|
Add the following line to your psql profile (e.g. ~/.psqlrc)
|
|
|
|
\\setenv PAGER pspg
|
|
|
|
\\pset border 2
|
|
|
|
\\pset linestyle unicode
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2017-12-15 06:04:05 +00:00
|
|
|
assert_match "pspg-#{version.to_f}", shell_output("#{bin}/pspg --version")
|
2017-11-15 23:49:01 +00:00
|
|
|
end
|
|
|
|
end
|