sbt 0.13.5
Use the standard sbt launcher script from typesafe Closes Homebrew/homebrew#32072. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
a61dad67ba
commit
008f55af1a
1 changed files with 21 additions and 11 deletions
|
@ -2,26 +2,36 @@ require "formula"
|
|||
|
||||
class Sbt < Formula
|
||||
homepage "http://www.scala-sbt.org"
|
||||
url "http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.5/sbt-launch.jar"
|
||||
version "0.13.5"
|
||||
sha1 "f6308bd94bebdd37eb5e2fda732694ce0f34be74"
|
||||
url "http://dl.bintray.com/sbt/native-packages/sbt/0.13.5/sbt-0.13.5.tgz"
|
||||
sha1 "9a77a6971478ebf2272735f40ab65443dcb60259"
|
||||
|
||||
def install
|
||||
(bin/"sbt").write <<-EOS.undent
|
||||
#!/bin/sh
|
||||
test -f ~/.sbtconfig && . ~/.sbtconfig
|
||||
exec java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled ${SBT_OPTS} -jar #{libexec}/sbt-launch.jar "$@"
|
||||
EOS
|
||||
inreplace "bin/sbt", 'etc_sbt_opts_file="${sbt_home}/conf/sbtopts"', "etc_sbt_opts_file=\"#{etc}/sbtopts\""
|
||||
inreplace "bin/sbt", '/etc/sbt/sbtopts', "#{etc}/sbtopts"
|
||||
|
||||
libexec.install Dir['*']
|
||||
inreplace "bin/sbt-launch-lib.bash" do |s|
|
||||
s.gsub! '${sbt_home}/bin/sbt-launch.jar', "#{libexec}/sbt-launch.jar"
|
||||
|
||||
if File.file?("#{ENV['HOME']}/.sbtconfig")
|
||||
opoo "Use of ~/.sbtconfig is deprecated. Please migrate global settings to #{etc}/sbtopts"
|
||||
s << "\n\ntest -f \"$HOME/.sbtconfig\" && source \"$HOME/.sbtconfig\""
|
||||
end
|
||||
end
|
||||
|
||||
bin.install "bin/sbt", "bin/sbt-launch-lib.bash"
|
||||
libexec.install "bin/sbt-launch.jar"
|
||||
etc.install "conf/sbtopts"
|
||||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
You can use $SBT_OPTS to pass additional JVM options to SBT.
|
||||
For convenience, this can be specified in `~/.sbtconfig`.
|
||||
|
||||
For example:
|
||||
SBT_OPTS="-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M"
|
||||
SBT_OPTS="-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M"
|
||||
|
||||
This formula is now using the standard typesafe sbt launcher script.
|
||||
Project specific options should be placed in .sbtopts in the root of your project.
|
||||
Global settings should be placed in #{etc}/sbtopts
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue