2011-11-28 17:40:42 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2012-03-21 16:16:04 +00:00
|
|
|
class CpioDownloadStrategy < CurlDownloadStrategy
|
|
|
|
def stage
|
|
|
|
system "gzcat #{@tarball_path} | cpio -id"
|
|
|
|
chdir
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-11-28 17:40:42 +00:00
|
|
|
class Mksh < Formula
|
2013-02-22 21:46:36 +00:00
|
|
|
homepage 'https://mirbsd.org/mksh.htm'
|
|
|
|
url 'https://mirbsd.org/MirOS/dist/mir/mksh/mksh-R43.tgz'
|
|
|
|
version '0.43'
|
|
|
|
sha256 '65e54a0cd4189b80cf24fdf1b1b959a707522451025cc22f7d3ba451566ffc81'
|
2011-11-28 17:40:42 +00:00
|
|
|
|
|
|
|
def install
|
2012-12-22 23:39:30 +00:00
|
|
|
system "sh", "./Build.sh", "-c", (ENV.compiler == :clang ? "lto" : "combine")
|
2011-11-28 17:40:42 +00:00
|
|
|
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
|
2012-03-21 16:16:04 +00:00
|
|
|
Then, any user may run `chsh` to change their shell.
|
2011-11-28 17:40:42 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|