aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorAdam Vandenberg2012-03-21 09:16:04 -0700
committerAdam Vandenberg2012-03-21 12:12:10 -0700
commite0ecae364fbb733c4c57ac20016ae027ce6ca668 (patch)
treedb6fc07310a157e33183d19c8b57e5ebae1e1a66 /Library/Formula
parent0e9eb9e17e64d47f00c3a588eeab569bf0888085 (diff)
downloadhomebrew-e0ecae364fbb733c4c57ac20016ae027ce6ca668.tar.bz2
mksh: use custom download strategy to deal with cpio
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/mksh.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/Library/Formula/mksh.rb b/Library/Formula/mksh.rb
index cb1d3a72d..6578d1c93 100644
--- a/Library/Formula/mksh.rb
+++ b/Library/Formula/mksh.rb
@@ -1,10 +1,18 @@
require 'formula'
+class CpioDownloadStrategy < CurlDownloadStrategy
+ def stage
+ system "gzcat #{@tarball_path} | cpio -id"
+ chdir
+ end
+end
+
class Mksh < Formula
- url 'https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R40d.cpio.gz'
homepage 'https://www.mirbsd.org/mksh.htm'
- md5 'c6428401103367730a95b99284bf47dc'
+ url 'https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R40d.cpio.gz',
+ :using => CpioDownloadStrategy
version '0.40d'
+ md5 'c6428401103367730a95b99284bf47dc'
def install
system 'sh ./Build.sh -combine'
@@ -15,9 +23,7 @@ class Mksh < Formula
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.
+ Then, any user may run `chsh` to change their shell.
EOS
end
end