2014-09-26 16:08:57 +00:00
|
|
|
require "formula"
|
2009-09-02 19:27:58 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Fish < Formula
|
2014-09-26 16:08:57 +00:00
|
|
|
homepage "http://fishshell.com"
|
|
|
|
url "https://github.com/fish-shell/fish-shell/releases/download/2.1.1/fish-2.1.1.tar.gz"
|
|
|
|
sha1 "8f97f39b92ea7dfef1f464b18e304045bf37546d"
|
2009-09-02 19:27:58 +00:00
|
|
|
|
2014-09-26 21:23:56 +00:00
|
|
|
bottle do
|
|
|
|
sha1 "61736de475346ff8aba971429d217b827730bc65" => :mavericks
|
|
|
|
sha1 "1d8d3f5656a4a9ec53d22b908581109eecfc9769" => :mountain_lion
|
|
|
|
sha1 "56535dfe5f9a6c4bad0b7d8e9571ab00e5a2f772" => :lion
|
|
|
|
end
|
|
|
|
|
2013-09-20 15:15:53 +00:00
|
|
|
head do
|
2014-10-27 22:20:46 +00:00
|
|
|
url "https://github.com/fish-shell/fish-shell.git", :shallow => false
|
2013-09-20 15:15:53 +00:00
|
|
|
|
2014-12-04 17:01:20 +00:00
|
|
|
depends_on "autoconf" => :build
|
2013-09-20 15:15:53 +00:00
|
|
|
# Indeed, the head build always builds documentation
|
2014-09-26 16:08:57 +00:00
|
|
|
depends_on "doxygen" => :build
|
2013-09-20 15:15:53 +00:00
|
|
|
end
|
2011-07-20 20:03:06 +00:00
|
|
|
|
2014-09-26 16:08:57 +00:00
|
|
|
skip_clean "share/doc"
|
2009-09-02 19:27:58 +00:00
|
|
|
|
|
|
|
def install
|
2014-10-27 22:20:46 +00:00
|
|
|
if build.head?
|
|
|
|
ENV['GIT_DIR'] = cached_download/'.git'
|
|
|
|
system "autoconf"
|
|
|
|
end
|
2014-09-15 15:01:42 +00:00
|
|
|
# In Homebrew's 'superenv' sed's path will be incompatible, so
|
|
|
|
# the correct path is passed into configure here.
|
|
|
|
system "./configure", "--prefix=#{prefix}", "SED=/usr/bin/sed"
|
2013-10-28 09:15:53 +00:00
|
|
|
system "make", "install"
|
2009-09-02 19:27:58 +00:00
|
|
|
end
|
|
|
|
|
2014-09-26 16:08:57 +00:00
|
|
|
def post_install
|
|
|
|
system "pkill fishd || true"
|
|
|
|
end
|
|
|
|
|
2013-05-20 01:16:16 +00:00
|
|
|
test do
|
2013-10-28 09:15:53 +00:00
|
|
|
system "#{bin}/fish", "-c", "echo"
|
2013-05-20 01:16:16 +00:00
|
|
|
end
|
|
|
|
|
2011-07-20 20:03:06 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
You will need to add:
|
|
|
|
#{HOMEBREW_PREFIX}/bin/fish
|
|
|
|
to /etc/shells. Run:
|
|
|
|
chsh -s #{HOMEBREW_PREFIX}/bin/fish
|
|
|
|
to make fish your default shell.
|
|
|
|
EOS
|
2009-09-02 19:27:58 +00:00
|
|
|
end
|
|
|
|
end
|