2010-11-18 19:34:17 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Giter8 < Formula
|
2011-12-20 20:49:12 +00:00
|
|
|
url "http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-launch/0.11.2/sbt-launch.jar"
|
2010-11-18 19:34:17 +00:00
|
|
|
homepage 'http://github.com/n8han/giter8'
|
2011-12-20 20:49:12 +00:00
|
|
|
md5 '2886cc391e38fa233b3e6c0ec9adfa1e'
|
2012-06-12 21:13:07 +00:00
|
|
|
version '0.4.5'
|
2010-11-18 19:34:17 +00:00
|
|
|
|
|
|
|
def exec_script
|
|
|
|
<<-EOS
|
|
|
|
#!/bin/sh
|
2011-12-20 20:49:12 +00:00
|
|
|
exec java -Xmx512M -jar #{prefix}/sbt-launch.jar @giter8.launchconfig "$@"
|
2010-11-18 19:34:17 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
def config_script
|
|
|
|
<<-EOS
|
|
|
|
[app]
|
2012-06-12 21:13:07 +00:00
|
|
|
version: 0.4.5
|
2012-02-28 04:23:57 +00:00
|
|
|
org: net.databinder.giter8
|
2010-11-18 19:34:17 +00:00
|
|
|
name: giter8
|
|
|
|
class: giter8.Giter8
|
|
|
|
[scala]
|
2011-12-20 20:49:12 +00:00
|
|
|
version: 2.9.1
|
2010-11-18 19:34:17 +00:00
|
|
|
[repositories]
|
|
|
|
local
|
|
|
|
scala-tools-releases
|
|
|
|
maven-central
|
|
|
|
[boot]
|
|
|
|
directory: #{prefix}/boot
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
(bin+'g8').write exec_script
|
|
|
|
(prefix+'giter8.launchconfig').write config_script
|
2011-12-20 20:49:12 +00:00
|
|
|
prefix.install 'sbt-launch.jar'
|
2010-11-18 19:34:17 +00:00
|
|
|
end
|
|
|
|
|
2011-12-29 17:01:16 +00:00
|
|
|
def caveats; <<-EOS.undent
|
2010-11-18 19:34:17 +00:00
|
|
|
Giter8 will download the Scala runtime from scala-tools.org
|
|
|
|
and the rest of the giter8 binaries the first time you run it.
|
|
|
|
You can do that now running "g8".
|
|
|
|
|
|
|
|
If the download of a resources fails, try cleaning your
|
|
|
|
~/.ivy2/cache folder and rerun / reinstall giter8.
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|