Added formula for clojure-1.0.0

This commit is contained in:
Luke Amdor 2009-09-25 16:44:35 -05:00 committed by Max Howell
parent 688c12c727
commit d1fabf2f51

29
Formula/clojure.rb Normal file
View file

@ -0,0 +1,29 @@
require 'brewkit'
class Clojure <Formula
url 'http://clojure.googlecode.com/files/clojure_1.0.0.zip'
homepage 'http://clojure.org/'
md5 'e7a50129040df7fe52287006988ecbb2'
JAR = "clojure-1.0.0.jar"
def install
prefix.install JAR
# create helpful scripts to start clojure
bin.mkdir
clojure_exec = bin+'clj'
clojure_exec.write <<-EOS
#!/bin/sh
java -Xmx512M -cp #{prefix}/#{JAR} clojure.lang.Script "$@"
EOS
File.chmod(0755, clojure_exec)
clojure_repl_exec = bin+'clj_repl'
clojure_repl_exec.write <<-EOS
#!/bin/sh
java -Xmx512M -cp #{prefix}/#{JAR} clojure.lang.Repl "$@"
EOS
File.chmod(0755, clojure_repl_exec)
end
end