aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/jmeter.rb
blob: a6af95d4c4ccdf6ffd27d3be3b929ee1e7b02382 (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 Jmeter < Formula
  homepage 'http://jakarta.apache.org/jmeter/'
  url 'http://apache.webxcreen.org/jmeter/binaries/apache-jmeter-2.7.tgz'
  sha1 'cffa989e7b53dc06a9eaab3bd377b83acae4822b'

  def startup_script name
    <<-EOS.undent
      #!/bin/bash
      exec "#{libexec}/bin/#{name}" "$@"
    EOS
  end

  def install
    # Remove windows files
    rm_f Dir["bin/*.bat"]
    prefix.install %w{ LICENSE NOTICE README }
    libexec.install Dir['*']
    (bin/'jmeter').write startup_script('jmeter')
  end
end