diff options
| author | Dominyk Tiller | 2015-02-27 13:01:22 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2015-02-28 16:42:37 +0000 |
| commit | b066061ffc1ce1c1b4f4b63f62bdd13507789781 (patch) | |
| tree | 60d5b9011e1a7e55ceeae2496f9f8f221c2169ac /Library | |
| parent | 440bc1cbb7fd024d1101d7fb8fe1fcb2ec1e6d64 (diff) | |
| download | homebrew-b066061ffc1ce1c1b4f4b63f62bdd13507789781.tar.bz2 | |
sha2 1.0.1 (new formula)
The world’s tiniest checksumming utility.(Probably. It’s 27KB when
compiled).
Handles SHA-256, SHA-384 and SHA-512. Ultra-portable. BSD licensed.
Generally a neat tiny tool that I’m fond of.
Closes #37243.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/sha2.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Library/Formula/sha2.rb b/Library/Formula/sha2.rb new file mode 100644 index 000000000..14abbf844 --- /dev/null +++ b/Library/Formula/sha2.rb @@ -0,0 +1,20 @@ +class Sha2 < Formula + homepage "http://www.aarongifford.com/computers/sha.html" + url "http://www.aarongifford.com/computers/sha2-1.0.1.tgz" + sha1 "ffbc69e0b0ab47f70e61aeb14fa16ba2b74dc728" + + option "without-check", "Skip compile-time tests" + + def install + system ENV.cc, "-o", "sha2", "sha2prog.c", "sha2.c" + system "perl", "sha2test.pl" if build.with? "check" + bin.install "sha2" + end + + test do + (testpath/"checkme.txt").write("homebrew") + output = pipe_output("#{bin}/sha2 -q -256 #{testpath}/checkme.txt") + expected = "12c87370d1b5472793e67682596b60efe2c6038d63d04134a1a88544509737b4" + assert output.include? expected + end +end |
