Make launchers more resilient to Clojure version changes.
This commit is contained in:
parent
775e79b8ce
commit
fa9b51743c
@ -16,7 +16,9 @@ clojure-1.3.0-alpha1.jar needs to be placed in a directory `lib` under this
|
|||||||
project.
|
project.
|
||||||
|
|
||||||
You can use Leiningen (http://github.com/technomancy/leiningen) to
|
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
|
After you have leiningen installed, run
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
(defproject functional-koans "0.1.0"
|
(defproject functional-koans "0.1.0"
|
||||||
:description "The functional koans"
|
:description "The functional koans"
|
||||||
:dependencies [[org.clojure/clojure "1.3.0-alpha1"]])
|
:dependencies [[org.clojure/clojure "1.3.0-alpha1"]
|
||||||
|
[jline "0.9.94"]])
|
||||||
|
13
repl.bat
13
repl.bat
@ -1,2 +1,13 @@
|
|||||||
@echo off
|
@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
10
repl.sh
@ -1,2 +1,8 @@
|
|||||||
java -jar lib/clojure-1.3.0-alpha1.jar
|
#!/bin/sh
|
||||||
echo
|
CLASSPATH=src
|
||||||
|
|
||||||
|
for f in lib/*.jar; do
|
||||||
|
CLASSPATH=$CLASSPATH:$f
|
||||||
|
done
|
||||||
|
|
||||||
|
java -Xmx1G -cp $CLASSPATH jline.ConsoleRunner clojure.main
|
||||||
|
11
run.bat
11
run.bat
@ -1,2 +1,11 @@
|
|||||||
@echo off
|
@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
9
run.sh
@ -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
|
echo
|
||||||
|
9
test.bat
9
test.bat
@ -1,2 +1,9 @@
|
|||||||
@echo off
|
@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))"
|
||||||
|
9
test.sh
9
test.sh
@ -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
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user