aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/closure-compiler.rb
blob: 1bc20e7247d03a23ca546fd15faf70afd1b1c398 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'formula'

class ClosureCompiler < Formula
  homepage 'http://code.google.com/p/closure-compiler/'
  # Use an SVN download to get the externals as well
  url 'svn+http://closure-compiler.googlecode.com/svn/trunk/', :revision => '2180'
  version '20120917'

  head 'svn+http://closure-compiler.googlecode.com/svn/trunk/'

  def install
    system "ant", "clean"
    system "ant"

    libexec.install Dir['*']

    (bin/'closure-compiler').write <<-EOS.undent
      #!/bin/bash
      java -jar "#{libexec}/build/compiler.jar" "$@"
    EOS
  end
end