2014-10-05 17:19:04 +00:00
|
|
|
class Hh < Formula
|
2015-06-15 10:17:58 +00:00
|
|
|
desc "Bash and zsh history suggest box"
|
2014-10-05 17:19:04 +00:00
|
|
|
homepage "https://github.com/dvorka/hstr"
|
2015-11-29 05:08:52 +00:00
|
|
|
url "https://github.com/dvorka/hstr/releases/download/1.19/hh-1.19-src.tgz"
|
|
|
|
sha256 "b67cb5e2515948fd0fb402b732630a51885be5dfe58cbf914c22ea444129a647"
|
2014-10-05 17:19:04 +00:00
|
|
|
|
2014-11-04 20:02:56 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-11-29 05:16:23 +00:00
|
|
|
sha256 "b241ad9ec87ae46d2e125fa939294a6aea603fc857aeea030526954290bfee18" => :el_capitan
|
|
|
|
sha256 "f737693414e21b5ab9c434be4ffd5923fb4ccc153c4039ba2a65dea4f1010a95" => :yosemite
|
|
|
|
sha256 "b87d487cb1a2d951d9b38c651dda2cc6f3161e183a2174d033f220c0b9bb2cda" => :mavericks
|
2014-11-04 20:02:56 +00:00
|
|
|
end
|
|
|
|
|
2014-10-05 17:19:04 +00:00
|
|
|
head do
|
|
|
|
url "https://github.com/dvorka/hstr.git"
|
2014-12-04 17:01:24 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
2014-10-05 17:19:04 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
depends_on "readline"
|
|
|
|
|
|
|
|
def install
|
2015-01-23 09:24:17 +00:00
|
|
|
system "autoreconf", "-fvi" if build.head?
|
2014-10-05 17:19:04 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
path = testpath/".hh_test"
|
|
|
|
path.write "test\n"
|
|
|
|
ENV["HISTFILE"] = path
|
|
|
|
assert_equal "test\n", `#{bin}/hh -n`
|
|
|
|
end
|
|
|
|
end
|