homebrew-core/Formula/mksh.rb
2017-08-30 22:39:06 -07:00

33 lines
1.1 KiB
Ruby

class Mksh < Formula
desc "MirBSD Korn Shell"
homepage "https://www.mirbsd.org/mksh.htm"
url "https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R56b.tgz"
mirror "https://dl.bintray.com/homebrew/mirror/mksh-56b.tgz"
version "56b"
sha256 "40ec744eec256583e4e18907cde22af57c980286f535df47326fed07e48c9a7f"
bottle do
cellar :any_skip_relocation
sha256 "92b1f35f5311b97ed642b740a3f27b06b87b602004d75c401d342ad4f1622b8f" => :sierra
sha256 "869c03bacc72c9d7d56f9a1371bef7072df1d39213cf6cc23b924cb7056d7853" => :el_capitan
sha256 "f60810eeec945b44fccf6b64943666d0c4aab9fe0d0cd94c37cda411073ccc29" => :yosemite
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
test do
assert_equal "honk",
shell_output("#{bin}/mksh -c 'echo honk'").chomp
end
end