From 7968bce0b08b010ef88ba3d64a8e69f97e0fe12f Mon Sep 17 00:00:00 2001 From: Gaƫtan Lehmann Date: Sat, 19 Apr 2014 11:24:32 +0200 Subject: shellcheck: 0.3.2 --- Library/Formula/shellcheck.rb | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Library/Formula/shellcheck.rb (limited to 'Library/Formula/shellcheck.rb') diff --git a/Library/Formula/shellcheck.rb b/Library/Formula/shellcheck.rb new file mode 100644 index 000000000..5ffeb8349 --- /dev/null +++ b/Library/Formula/shellcheck.rb @@ -0,0 +1,32 @@ +require "formula" +require "language/haskell" + +class Shellcheck < Formula + include Language::Haskell::Cabal + + homepage "http://www.shellcheck.net" + url "https://github.com/koalaman/shellcheck/archive/v0.3.2.tar.gz" + sha1 "dd030c63f16e9170eb415176d101bbd2ce66fe00" + + depends_on "ghc" => :build + depends_on "cabal-install" => :build + depends_on "pandoc" => :build + depends_on "gmp" + + def install + install_cabal_package + system "make", "shellcheck.1" + man1.install "shellcheck.1" + end + + test do + sh = testpath/"test.sh" + sh.write <<-EOS.undent + for f in $(ls *.wav) + do + echo "$f" + done + EOS + assert `shellcheck -f gcc #{sh}`.include? "Iterate over globs whenever possible" + end +end -- cgit v1.2.3