diff options
| author | Dominyk Tiller | 2015-02-08 01:51:30 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2015-02-08 12:24:02 +0000 |
| commit | 51f0cdd65d18f88c5ac473e629785f64c499d38e (patch) | |
| tree | f4d804f89bc6e7647019dedc4e2d57269ce13811 /Library | |
| parent | d22bdbd89955d4092b7676d797c85f77c266712d (diff) | |
| download | homebrew-51f0cdd65d18f88c5ac473e629785f64c499d38e.tar.bz2 | |
osh 20150115
Version bump.
Closes #36638.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/osh.rb | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/Library/Formula/osh.rb b/Library/Formula/osh.rb index b0c3b97c8..6f37ebb84 100644 --- a/Library/Formula/osh.rb +++ b/Library/Formula/osh.rb @@ -1,10 +1,15 @@ -require "formula" - class Osh < Formula homepage "http://v6shell.org" - head "https://github.com/JNeitzel/v6shell" - url "http://v6shell.org/src/osh-20140410.tar.gz" - sha1 "73d44e5d04504e6af1ffb6e23763ec7f5a40ae1a" + url "http://v6shell.org/src/osh-20150115.tar.gz" + sha1 "1876e56b82ebad814aa74c62a2fb8a93947e2a65" + 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" + sha1 "43da6a1d0f6810f2311786e04870c3896b6904c9" + end bottle do cellar :any @@ -14,6 +19,22 @@ class Osh < Formula end def install - system "make", "install", "prefix=#{prefix}" + 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 end end |
