2014-06-13 17:53:18 +00:00
|
|
|
class Osh < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Two ports of /bin/sh from V6 UNIX (circa 1975)"
|
2014-06-13 17:53:18 +00:00
|
|
|
homepage "http://v6shell.org"
|
2015-02-08 01:51:30 +00:00
|
|
|
url "http://v6shell.org/src/osh-20150115.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "711151f222a7f3e7cb9500d11ded7bb19a66f94641f352e0ccb316dd9665aa1d"
|
2015-02-08 01:51:30 +00:00
|
|
|
head "https://github.com/JNeitzel/v6shell.git"
|
|
|
|
|
|
|
|
option "with-examples", "Build with shell examples"
|
|
|
|
|
|
|
|
resource "examples" do
|
|
|
|
url "http://v6shell.org/v6scripts/v6scripts-20150201.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "411184449da48c59c9f341de748b1b6ea2a1c898848bf3bbf2b523e33ef62518"
|
2015-02-08 01:51:30 +00:00
|
|
|
end
|
2014-06-13 17:53:18 +00:00
|
|
|
|
2014-06-13 18:14:51 +00:00
|
|
|
bottle do
|
2015-02-08 05:01:24 +00:00
|
|
|
sha1 "7216e6df8d89efb36f07bdae0f7eedb667ad0ff5" => :yosemite
|
|
|
|
sha1 "5afde1b872117f02f951f6292c684e13d9f19332" => :mavericks
|
|
|
|
sha1 "b1f9dab5fcce8f3d8a1a791edb19d765a7361053" => :mountain_lion
|
2014-06-13 18:14:51 +00:00
|
|
|
end
|
|
|
|
|
2014-06-13 17:53:18 +00:00
|
|
|
def install
|
2015-02-08 01:51:30 +00:00
|
|
|
system "make", "install", "PREFIX=#{prefix}", "SYSCONFDIR=#{etc}"
|
|
|
|
|
|
|
|
if build.with? "examples"
|
|
|
|
resource("examples").stage do
|
|
|
|
ENV.prepend_path "PATH", bin
|
|
|
|
system "./INSTALL", libexec
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
assert_match /Homebrew!/, shell_output("#{bin}/osh -c 'echo Homebrew!'").strip
|
|
|
|
|
|
|
|
if build.with? "examples"
|
|
|
|
ENV.prepend_path "PATH", libexec
|
|
|
|
assert_match /1 3 5 7 9 11 13 15 17 19/, shell_output("#{libexec}/counts").strip
|
|
|
|
end
|
2014-06-13 17:53:18 +00:00
|
|
|
end
|
|
|
|
end
|