2017-11-15 23:49:01 +00:00
|
|
|
class Pspg < Formula
|
|
|
|
desc "Unix pager optimized for psql"
|
|
|
|
homepage "https://github.com/okbob/pspg"
|
2017-12-15 06:04:05 +00:00
|
|
|
url "https://github.com/okbob/pspg/archive/0.8.0.tar.gz"
|
|
|
|
sha256 "b479164aa25b30863b410a6051638cf772c3bc00e34a695abeb43c1bb7c6afd3"
|
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
|
2017-12-15 06:25:32 +00:00
|
|
|
sha256 "12dfc917a5dc3eb9c5fde2925978960c572c2972f174740669ad32a1c89ec221" => :high_sierra
|
|
|
|
sha256 "54cc6869c1972cc8737d6fcac1d646c6581358d45ced9c26b69ab35ef9a3e916" => :sierra
|
|
|
|
sha256 "6381702e9cf175d0e185f32f81a582031af08f087bff199caf8662b0f69efac5" => :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
|