aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/mksh.rb
blob: aeb4bcd94ed0517b55091320b047d395035dbab8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require 'formula'

class Mksh < Formula
  homepage 'https://mirbsd.org/mksh.htm'
  url 'http://mirbsd.org/MirOS/dist/mir/mksh/mksh-R50b.tgz'
  sha1 '5554d18126eb861caa71891d6a135014b9aabb99'

  bottle do
    cellar :any
    sha1 "b643e1c9418f9bb4f46487d4351c43aa9195f094" => :mavericks
    sha1 "f274f48e9e8d7fc29cb4f018d733ffe43e696fb0" => :mountain_lion
    sha1 "35c935b1912d577e04e4090b59080ba7f4cb204d" => :lion
  end

  def install
    system "sh", "./Build.sh", "-r", "-c", (ENV.compiler == :clang ? "lto" : "combine")
    bin.install 'mksh'
    man1.install 'mksh.1'
  end

  def caveats; <<-EOS.undent
    To allow using mksh as a login shell, run this as root:
        echo #{HOMEBREW_PREFIX}/bin/mksh >> /etc/shells
    Then, any user may run `chsh` to change their shell.
    EOS
  end
end