scriptcs 0.13.3 (new formula)
Write C# apps with a text editor, nuget and the power of Roslyn! http://scriptcs.net Closes Homebrew/homebrew#37980. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
a52ff0844c
commit
73f6300312
1 changed files with 25 additions and 0 deletions
25
Formula/scriptcs.rb
Normal file
25
Formula/scriptcs.rb
Normal file
|
@ -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
|
Loading…
Reference in a new issue