forked from technomancy/leiningen
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
815adb8
commit 5e9f694
Showing
2 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
@echo off | ||
|
||
rem this script works after downloading Leiningen standalone jar | ||
rem from http://repo.technomancy.us/ | ||
rem and copying it on %LEIN_JAR% path | ||
rem There is needed also Clojure jar from http://build.clojure.org/ | ||
rem and it should be copied on %CLOJURE_JAR% path | ||
|
||
|
||
set CLOJURE_VERSION=1.1.0-alpha-SNAPSHOT | ||
set LEIN_VERSION=1.0.1-SNAPSHOT | ||
set LEIN_JAR=%HOMEDRIVE%%HOMEPATH%\.m2\repository\leiningen\leiningen\%LEIN_VERSION%\leiningen-%LEIN_VERSION%-standalone.jar | ||
set CLOJURE_JAR=%HOMEDRIVE%%HOMEPATH%\.m2\repository\org\clojure\clojure\%CLOJURE_VERSION%\clojure-%CLOJURE_VERSION%.jar | ||
|
||
rem ################################################## | ||
rem count number of command line arguments | ||
rem | ||
set ARGCOUNT=0 | ||
for %%a in (%*) do set /a ARGCOUNT+=1 | ||
rem ################################################## | ||
|
||
|
||
rem ################################################## | ||
rem add jars found under "lib" directory to CLASSPATH | ||
rem | ||
setLocal EnableDelayedExpansion | ||
set CLASSPATH=" | ||
for /R ./lib %%a in (*.jar) do ( | ||
set CLASSPATH=!CLASSPATH!;%%a | ||
) | ||
set CLASSPATH=!CLASSPATH!" | ||
|
||
set CLASSPATH=%CLASSPATH%;"%LEIN_JAR%" | ||
if "%DEBUG%" == "" goto :RUN | ||
echo CLASSPATH=%CLASSPATH% | ||
rem ################################################## | ||
|
||
:RUN | ||
if "%ARGCOUNT%" == "2" goto :RUN_ARG2 | ||
if "%ARGCOUNT%" == "3" goto :RUN_ARG3 | ||
java -Xbootclasspath/a:"%CLOJURE_JAR%" -client -cp %CLASSPATH% clojure.main -e "(use 'leiningen.core) (-main \"%1\")" | ||
goto :EOF | ||
|
||
:RUN_ARG2 | ||
java -Xbootclasspath/a:"%CLOJURE_JAR%" -client -cp %CLASSPATH% clojure.main -e "(use 'leiningen.core) (-main \"%1\" \"%2\")" | ||
goto :EOF | ||
|
||
:RUN_ARG3 | ||
java -Xbootclasspath/a:"%CLOJURE_JAR%" -client -cp %CLASSPATH% clojure.main -e "(use 'leiningen.core) (-main \"%1\" \"%2\" \"%3\")" | ||
goto :EOF | ||
|
||
:EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters