2014-08-24 19:08:42 +00:00
|
|
|
class Golo < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Lightweight dynamic language for the JVM"
|
2014-08-24 19:08:42 +00:00
|
|
|
homepage "http://golo-lang.org"
|
2016-03-21 21:14:16 +00:00
|
|
|
url "https://bintray.com/artifact/download/golo-lang/downloads/golo-3.1.0.zip"
|
|
|
|
sha256 "a684a089a808b29d42a4aa972db74c000c7686d32031764da8ab0c11a2b97820"
|
2016-01-14 21:53:36 +00:00
|
|
|
|
2014-08-24 19:08:42 +00:00
|
|
|
head do
|
2015-07-27 08:31:37 +00:00
|
|
|
url "https://github.com/eclipse/golo-lang.git"
|
2014-08-24 19:08:42 +00:00
|
|
|
end
|
|
|
|
|
2015-11-10 18:03:31 +00:00
|
|
|
bottle :unneeded
|
|
|
|
|
2015-11-10 14:50:51 +00:00
|
|
|
depends_on :java => "1.8+"
|
2014-08-24 19:08:42 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
if build.head?
|
2015-09-07 14:33:18 +00:00
|
|
|
system "./gradlew", "installDist"
|
|
|
|
libexec.install %w[build/install/golo/bin build/install/golo/docs build/install/golo/lib]
|
2014-08-24 19:08:42 +00:00
|
|
|
else
|
2015-11-10 14:50:51 +00:00
|
|
|
libexec.install %w[bin docs lib]
|
2014-08-24 19:08:42 +00:00
|
|
|
end
|
2015-01-30 09:45:14 +00:00
|
|
|
libexec.install %w[share samples]
|
2014-08-24 19:08:42 +00:00
|
|
|
|
|
|
|
rm_f Dir["#{libexec}/bin/*.bat"]
|
|
|
|
bin.install_symlink Dir["#{libexec}/bin/*"]
|
|
|
|
bash_completion.install "#{libexec}/share/shell-completion/golo-bash-completion"
|
|
|
|
zsh_completion.install "#{libexec}/share/shell-completion/golo-zsh-completion" => "_golo"
|
|
|
|
cp "#{bash_completion}/golo-bash-completion", zsh_completion
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
2015-01-30 09:45:14 +00:00
|
|
|
if ENV["SHELL"].include? "zsh"
|
|
|
|
<<-EOS.undent
|
|
|
|
For ZSH users, please add "golo" in yours plugins in ".zshrc"
|
2014-08-24 19:08:42 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|
2015-01-30 09:45:14 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/golo", "golo", "--files", "#{libexec}/samples/helloworld.golo"
|
|
|
|
end
|
2014-08-24 19:08:42 +00:00
|
|
|
end
|