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
|
|
|
|
homepage 'https://www.mirbsd.org/mksh.htm'
|
2012-03-21 16:16:04 +00:00
|
|
|
url 'https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R40d.cpio.gz',
|
|
|
|
:using => CpioDownloadStrategy
|
2012-01-07 03:49:25 +00:00
|
|
|
version '0.40d'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '74450a1107664797e5fdbdeb444f18f82f0686ac'
|
2011-11-28 17:40:42 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system 'sh ./Build.sh -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
|
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
|