Files
tigerbrew/Library/Formula/sbt.rb
T
David M. Lee ca753a344d Two enhancements to the sbt launch script.
1. Source a ~/.sbtconfig file, where the user can specify their own
   options for invoking sbt (such as
   SBT_OPTS="-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m")
2. Use exec to launch Java, just to get rid of the extra shell process.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-12-28 15:55:39 -08:00

21 lines
435 B
Ruby

require 'formula'
class Sbt <Formula
JAR = 'sbt-launch-0.7.4.jar'
url "http://simple-build-tool.googlecode.com/files/#{JAR}"
homepage 'http://code.google.com/p/simple-build-tool/'
md5 '8903fb141037056a497925f3efdb9edf'
def install
(bin+'sbt').write <<-EOS
#!/bin/sh
if test -f ~/.sbtconfig; then
. ~/.sbtconfig
fi
exec java -Xmx512M ${SBT_OPTS} -jar #{libexec}/#{JAR} "$@"
EOS
libexec.install Dir['*']
end
end