diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/clojure.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Library/Formula/clojure.rb b/Library/Formula/clojure.rb new file mode 100644 index 000000000..022068f12 --- /dev/null +++ b/Library/Formula/clojure.rb @@ -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 |
