diff options
| author | Tod Thomson | 2015-03-23 10:21:10 +1000 |
|---|---|---|
| committer | Mike McQuaid | 2015-03-23 08:48:47 +0000 |
| commit | 81fda7e1510b9b56be4f6618f287e22c5371683b (patch) | |
| tree | 8fe4bc46d5c2f1c1700d65951967f12d722912a1 /Library | |
| parent | 79eeaf18ab003bd3838dc8558014f36b996e5934 (diff) | |
| download | homebrew-81fda7e1510b9b56be4f6618f287e22c5371683b.tar.bz2 | |
scriptcs 0.13.3 (new formula)
Write C# apps with a text editor, nuget and the power of Roslyn!
http://scriptcs.net
Closes #37980.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/scriptcs.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Library/Formula/scriptcs.rb b/Library/Formula/scriptcs.rb new file mode 100644 index 000000000..f5bfd7ea0 --- /dev/null +++ b/Library/Formula/scriptcs.rb @@ -0,0 +1,25 @@ +class Scriptcs < Formula + homepage "https://github.com/scriptcs/scriptcs" + url "https://github.com/scriptcs/scriptcs/archive/v0.13.3.tar.gz" + sha256 "08cf6f2fc14b334ec8d18367a47e5210e99928c3c1cd3d16f2e94d596c8ab44a" + + depends_on "mono" => :recommended + + def install + script_file = "scriptcs.sh" + system "./build.sh" + libexec.install Dir["src/ScriptCs/bin/Release/*"] + (libexec/script_file).write <<-EOS.undent + #!/usr/bin/env bash + mono #{libexec}/scriptcs.exe $@ + EOS + (libexec/script_file).chmod 0755 + bin.install_symlink libexec/script_file => "scriptcs" + end + + test do + test_file = "tests.csx" + (testpath/test_file).write('Console.WriteLine("{0}, {1}!", "Hello", "world");') + assert_equal "Hello, world!", `scriptcs #{test_file}`.strip + end +end |
