2009-09-11 21:32:10 +00:00
|
|
|
require 'brewkit'
|
|
|
|
|
|
|
|
# even though "file -b" reports this as a zip archive, it's just a binary
|
2009-10-02 17:36:58 +00:00
|
|
|
class SbtHttpDownloadStrategy <CurlDownloadStrategy
|
2009-09-11 21:32:10 +00:00
|
|
|
def stage
|
|
|
|
FileUtils.mv @dl, File.basename(@url)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class Sbt <Formula
|
2009-09-30 15:18:16 +00:00
|
|
|
JAR = 'sbt-launcher-0.5.5.jar'
|
|
|
|
url "http://simple-build-tool.googlecode.com/files/#{JAR}"
|
|
|
|
homepage 'http://code.google.com/p/simple-build-tool'
|
|
|
|
md5 'e3593448b3be17ce1666c6241b8d2f90'
|
|
|
|
|
|
|
|
def download_strategy
|
|
|
|
SbtHttpDownloadStrategy
|
|
|
|
end
|
2009-09-11 21:32:10 +00:00
|
|
|
|
|
|
|
def install
|
2009-09-30 15:18:16 +00:00
|
|
|
(bin+'sbt').write <<-EOS
|
2009-09-11 21:32:10 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2009-09-30 15:18:16 +00:00
|
|
|
java -Xmx512M -jar #{prefix}/#{JAR} "$@"
|
2009-09-11 21:32:10 +00:00
|
|
|
EOS
|
|
|
|
|
|
|
|
prefix.install Dir['*']
|
|
|
|
end
|
|
|
|
end
|