2016-10-26 05:41:01 +00:00
|
|
|
class Loc < Formula
|
|
|
|
desc "Count lines of code quickly"
|
|
|
|
homepage "https://github.com/cgag/loc"
|
2016-11-28 14:05:38 +00:00
|
|
|
url "https://github.com/cgag/loc/archive/v0.3.4.tar.gz"
|
|
|
|
sha256 "01fd16f0f82e016da95c5ad66a0390372ca1bf1ded9981a7a1f004e4a50bb804"
|
2016-10-26 05:41:01 +00:00
|
|
|
|
2016-10-27 15:51:36 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2016-11-28 17:38:06 +00:00
|
|
|
sha256 "49ec3ef3b6b69265ba1d528c7c7faf2ab77278d3c05b8770d1ac0fb01f9d9e0f" => :sierra
|
|
|
|
sha256 "6966c2dc9e8cdbc2affece5a5db37e0fc7eb339f0ce7707ca4080d3c663030de" => :el_capitan
|
|
|
|
sha256 "348a0501c8a261faf0b83babf4227746551675036992786847ff651fa86c1d62" => :yosemite
|
2016-10-27 15:51:36 +00:00
|
|
|
end
|
|
|
|
|
2016-10-26 05:41:01 +00:00
|
|
|
depends_on "rust" => :build
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "cargo", "build", "--release"
|
|
|
|
bin.install "target/release/loc"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.cpp").write <<-EOS.undent
|
|
|
|
#include <stdio.h>
|
|
|
|
int main() {
|
|
|
|
println("Hello World");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
system bin/"loc", "test.cpp"
|
|
|
|
end
|
|
|
|
end
|