Make launchers more resilient to Clojure version changes.

This commit is contained in:
Colin Jones 2010-11-01 19:50:05 -05:00
parent 775e79b8ce
commit fa9b51743c
8 changed files with 59 additions and 9 deletions

View File

@ -16,7 +16,9 @@ clojure-1.3.0-alpha1.jar needs to be placed in a directory `lib` under this
project.
You can use Leiningen (http://github.com/technomancy/leiningen) to
automatically install the Clojure jar in the right place.
automatically install the Clojure jar in the right place. Leiningen will also
get you a couple more jarfiles, including JLine, which allows you some of the
functionality of readline (command-line history, for example).
After you have leiningen installed, run

View File

@ -1,3 +1,4 @@
(defproject functional-koans "0.1.0"
:description "The functional koans"
:dependencies [[org.clojure/clojure "1.3.0-alpha1"]])
:dependencies [[org.clojure/clojure "1.3.0-alpha1"]
[jline "0.9.94"]])

View File

@ -1,2 +1,13 @@
@echo off
java -jar lib\clojure-1.3.0-alpha1.jar
setLocal EnableDelayedExpansion
set CLASSPATH="
for /R ./lib %%a in (*.jar) do (
set CLASSPATH=!CLASSPATH!;%%a
)
set CLASSPATH=!CLASSPATH!"
set CLASSPATH=%CLASSPATH%;src
set JLINE=jline.ConsoleRunner
java -Xmx1G -cp "%CLASSPATH%" %JLINE% clojure.main

10
repl.sh
View File

@ -1,2 +1,8 @@
java -jar lib/clojure-1.3.0-alpha1.jar
echo
#!/bin/sh
CLASSPATH=src
for f in lib/*.jar; do
CLASSPATH=$CLASSPATH:$f
done
java -Xmx1G -cp $CLASSPATH jline.ConsoleRunner clojure.main

11
run.bat
View File

@ -1,2 +1,11 @@
@echo off
java -cp lib\clojure-1.3.0-alpha1.jar;src clojure.main -e "(load \"path_to_enlightenment\")" -e "(do (in-ns 'path-to-enlightenment) (run))"
setLocal EnableDelayedExpansion
set CLASSPATH="
for /R ./lib %%a in (*.jar) do (
set CLASSPATH=!CLASSPATH!;%%a
)
set CLASSPATH=!CLASSPATH!"
set CLASSPATH=%CLASSPATH%;src
java -Xmx1G -cp "%CLASSPATH%" clojure.main -e "(load \"path_to_enlightenment\")" -e "(do (in-ns 'path-to-enlightenment) (run))"

9
run.sh
View File

@ -1,2 +1,9 @@
java -cp lib/clojure-1.3.0-alpha1.jar:src clojure.main -e '(load "path_to_enlightenment")' -e "(do (in-ns 'path-to-enlightenment) (run))"
#!/bin/sh
CLASSPATH=src
for f in lib/*.jar; do
CLASSPATH=$CLASSPATH:$f
done
java -cp "$CLASSPATH" clojure.main -e '(load "path_to_enlightenment")' -e "(do (in-ns 'path-to-enlightenment) (run))"
echo

View File

@ -1,2 +1,9 @@
@echo off
java -cp lib\clojure-1.3.0-alpha1.jar;src clojure.main -e "(load \"path_to_answer_sheet\")" -e "(do (in-ns 'path-to-answer-sheet) (run))"
setLocal EnableDelayedExpansion
set CLASSPATH="
for /R ./lib %%a in (*.jar) do (
set CLASSPATH=!CLASSPATH!;%%a
)
set CLASSPATH=!CLASSPATH!"
java -Xmx1G -cp "%CLASSPATH%" clojure.main -e "(load \"path_to_answer_sheet\")" -e "(do (in-ns 'path-to-answer-sheet) (run))"

View File

@ -1,2 +1,9 @@
java -cp lib/clojure-1.3.0-alpha1.jar:src clojure.main -e '(load "path_to_answer_sheet")' -e "(do (in-ns 'path-to-answer-sheet) (run))"
#!/bin/sh
CLASSPATH=src
for f in lib/*.jar; do
CLASSPATH=$CLASSPATH:$f
done
java -cp "$CLASSPATH" clojure.main -e '(load "path_to_answer_sheet")' -e "(do (in-ns 'path-to-answer-sheet) (run))"
echo