homebrew-core/Formula/sbt.rb
Luke Amdor 8a8359159a SBT formula
A simple build tool for Scala projects that aims to do the basics well. It
requires Java 1.5 or later.
2009-09-18 13:37:13 +01:00

27 lines
590 B
Ruby

require 'brewkit'
# even though "file -b" reports this as a zip archive, it's just a binary
class HttpDownloadStrategy
def stage
FileUtils.mv @dl, File.basename(@url)
end
end
class Sbt <Formula
@url='http://simple-build-tool.googlecode.com/files/sbt-launcher-0.5.3.jar'
@homepage='http://code.google.com/p/simple-build-tool'
@md5='ff1a0b6da067573b8a06e4b07707b562'
def install
sbt_exec = bin+'sbt'
sbt_exec.write <<-EOS
#!/bin/sh
java -Xmx512M -jar #{prefix}/sbt-launcher-0.5.3.jar "$@"
EOS
File.chmod(0755, sbt_exec)
prefix.install Dir['*']
end
end