aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/deheader.rb
diff options
context:
space:
mode:
authorBastien Dejean2014-03-02 20:04:09 +0100
committerAdam Vandenberg2014-03-04 20:13:40 -0800
commita782eb37b7c201613449701f9d38281ea0032851 (patch)
tree03d029f64b2bb95bc67f830004b7a1476c521cf0 /Library/Formula/deheader.rb
parentb3e2128a6d899f0dfcf9956c960f6ab2159b25b9 (diff)
downloadhomebrew-a782eb37b7c201613449701f9d38281ea0032851.tar.bz2
deheader 0.8
Closes #27142. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/deheader.rb')
-rw-r--r--Library/Formula/deheader.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/Library/Formula/deheader.rb b/Library/Formula/deheader.rb
new file mode 100644
index 000000000..1498a7a47
--- /dev/null
+++ b/Library/Formula/deheader.rb
@@ -0,0 +1,27 @@
+require 'formula'
+
+class Deheader < Formula
+ homepage 'http://www.catb.org/~esr/deheader'
+ url 'http://www.catb.org/~esr/deheader/deheader-0.8.tar.gz'
+ sha1 '4527b4675a7b06d728cfa989a3b7844cdf091b40'
+ head 'https://git.gitorious.org/deheader/deheader.git'
+
+ depends_on :python
+
+ def install
+ bin.install "deheader"
+ man1.install "deheader.1"
+ end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <stdio.h>
+ #include <string.h>
+ int main(void) {
+ printf("%s", "foo");
+ return 0;
+ }
+ EOS
+ assert_equal "121", `deheader test.c | tr -cd 0-9`
+ end
+end