arx 0.2.1 (new formula)
The arx tool captures the parameters of an execution and encodes them as an executable, making for easy, consistent transfer and repetition of a particular run. Fix audit issues - Don't use formula name in description - Use system correctly in install and test Improve test based on feedback from DomT4 - Pathname#write instead of File#write - shell_output instead of backticks - assert_match on output from test script Improve test based on feedback from bfontaine - Use #{bin}/arx instead of arx - Drop parenthesis for chmod Improve install based on feedback from DomT4 Find platform tag in the same way as the Makefile does. Closes Homebrew/homebrew#45802. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
parent
8c2198b6d2
commit
385ce9f569
1 changed files with 28 additions and 0 deletions
28
Formula/arx.rb
Normal file
28
Formula/arx.rb
Normal file
|
@ -0,0 +1,28 @@
|
|||
class Arx < Formula
|
||||
desc "Bundles files and programs for easy transfer and repeatable execution"
|
||||
homepage "https://github.com/solidsnack/arx"
|
||||
url "https://github.com/solidsnack/arx/archive/0.2.1.tar.gz"
|
||||
sha256 "c3e91e4b9f72353061b0a104ee752da88770d695ef6329eca0f1049a56e9c110"
|
||||
|
||||
depends_on "ghc" => :build
|
||||
depends_on "cabal-install" => :build
|
||||
|
||||
def install
|
||||
system "cabal", "sandbox", "init"
|
||||
system "cabal", "update"
|
||||
system "cabal", "install", "--only-dependencies"
|
||||
system "make"
|
||||
|
||||
tag = `./bin/dist tag`.chomp
|
||||
bin.install "tmp/dist/arx-#{tag}/arx" => "arx"
|
||||
end
|
||||
|
||||
test do
|
||||
testscript = (testpath/"testing.sh")
|
||||
|
||||
testscript.write shell_output("#{bin}/arx tmpx // echo 'testing'")
|
||||
testscript.chmod 0555
|
||||
|
||||
assert_match /testing/, shell_output("./testing.sh")
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue