Skip to content

Instantly share code, notes, and snippets.

@danil-z
Forked from royingantaginting/brew.rb
Last active August 29, 2015 14:26
Show Gist options
  • Save danil-z/f5112bd63a35df3cede1 to your computer and use it in GitHub Desktop.
Save danil-z/f5112bd63a35df3cede1 to your computer and use it in GitHub Desktop.
Brew formula to install oclint version 0.8.1 or 0.9.dev.02251e4
require 'formula'
class Oclint < Formula
homepage 'http://oclint.org'
url 'http://archives.oclint.org/releases/0.8/oclint-0.8.1-x86_64-darwin-14.0.0.tar.gz'
version '0.8.1'
sha1 'c96d712c5b73e04eebb57c3a97dec2b4ecbb9ed4'
devel do
url 'http://archives.oclint.org/nightly/oclint-0.9.dev.603daa8-x86_64-darwin-14.4.0.tar.gz'
version '0.9.dev.603daa8'
sha1 '9ee49d2fd167eec09e1a33a56081c1bb22721f0d'
end
def install
lib.install Dir['lib/clang']
lib.install Dir['lib/oclint']
bin.install Dir['bin/*']
end
def test
system "echo \"int main() { return 0; }\" > #{prefix}/test.m"
system "#{bin}/oclint #{prefix}/test.m -- -c"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment