forked from paulirish/homebrew-versions-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grails21.rb
28 lines (24 loc) · 818 Bytes
/
grails21.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class Grails21 < Formula
desc "Web application framework for the Groovy language"
homepage "http://grails.org"
url "http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.1.4.zip"
sha256 "10d0b8929ce01b03db851ffee92ab30f67c12abd6541ff78fb412f901c57642f"
bottle :unneeded
# Grails 2.1.x doesn't support Java 8
depends_on :java => "1.7"
def install
rm_f Dir["bin/*.bat", "bin/cygrails", "*.bat"]
prefix.install %w[LICENSE README]
libexec.install Dir["*"]
bin.mkpath
Dir["#{libexec}/bin/*"].each do |f|
next unless File.extname(f).empty?
ln_s f, bin+File.basename(f)
end
end
test do
ENV["JAVA_HOME"] = `/usr/libexec/java_home`.chomp
assert_match "Grails version: #{version}",
shell_output("#{bin}/grails --version", 1)
end
end