2014-05-27 13:25:59 +00:00
|
|
|
require "formula"
|
2010-11-18 19:34:17 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Giter8 < Formula
|
2014-05-27 13:25:59 +00:00
|
|
|
homepage "https://github.com/n8han/giter8"
|
2014-11-27 10:41:56 +00:00
|
|
|
url "https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.7/sbt-launch.jar"
|
|
|
|
sha1 "b407b2a76ad72165f806ac7e7ea09132b951ef53"
|
|
|
|
version "0.6.6"
|
2010-11-18 19:34:17 +00:00
|
|
|
|
2014-05-27 13:25:59 +00:00
|
|
|
def exec_script; <<-EOS.undent
|
|
|
|
#!/bin/sh
|
|
|
|
exec java -Xmx512M -jar #{prefix}/sbt-launch.jar @giter8.launchconfig "$@"
|
2010-11-18 19:34:17 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
2014-05-27 13:25:59 +00:00
|
|
|
def config_script; <<-EOS.undent
|
|
|
|
[app]
|
|
|
|
version: #{version}
|
|
|
|
org: net.databinder.giter8
|
|
|
|
name: giter8
|
|
|
|
class: giter8.Giter8
|
|
|
|
[scala]
|
2014-11-27 10:41:56 +00:00
|
|
|
version: 2.10.4
|
2014-05-27 13:25:59 +00:00
|
|
|
[repositories]
|
|
|
|
local
|
|
|
|
maven-central
|
2014-11-27 10:41:56 +00:00
|
|
|
sonatype-releases: https://oss.sonatype.org/content/repositories/releases/
|
2014-05-27 13:25:59 +00:00
|
|
|
[boot]
|
|
|
|
directory: #{prefix}/boot
|
2010-11-18 19:34:17 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2014-05-27 13:25:59 +00:00
|
|
|
(bin/"g8").write exec_script
|
|
|
|
(prefix/"giter8.launchconfig").write config_script
|
|
|
|
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
|
2014-11-27 10:41:56 +00:00
|
|
|
Giter8 will download the Scala runtime and the rest of the
|
|
|
|
giter8 binaries the first time you run it.
|
|
|
|
You can do that now by running "g8".
|
2010-11-18 19:34:17 +00:00
|
|
|
|
|
|
|
If the download of a resources fails, try cleaning your
|
|
|
|
~/.ivy2/cache folder and rerun / reinstall giter8.
|
2014-05-27 13:25:59 +00:00
|
|
|
EOS
|
2010-11-18 19:34:17 +00:00
|
|
|
end
|
|
|
|
end
|