Created
August 1, 2010 14:46
-
-
Save qertoip/503434 to your computer and use it in GitHub Desktop.
clj.bat - dopracowany, uniwersalny wołacz clojura na Windows
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
:: Setup: | |
:: | |
:: 1. Change the constants to match your paths | |
:: 2. Put this clj.bat file on your PATH | |
:: | |
:: Usage: | |
:: | |
:: clj # Starts REPL | |
:: clj my_script.clj # Runs the script | |
:: clj my_script.clj arg1 arg2 # Runs the script with arguments | |
@echo off | |
:: Change the following to match your paths | |
set CLOJURE_DIR=D:\clojure-1.2.0 | |
set CLOJURE_JAR=%CLOJURE_DIR%\clojure-1.2.0.jar | |
set CONTRIB_JAR=%CLOJURE_DIR%\clojure-contrib-1.2.0.jar | |
set JLINE_JAR=%CLOJURE_DIR%\jline-0.9.94.jar | |
if (%1) == () ( | |
:: Start REPL | |
java -cp .;%JLINE_JAR%;%CLOJURE_JAR%;%CONTRIB_JAR% jline.ConsoleRunner clojure.main | |
) else ( | |
:: Start some_script.clj | |
java -cp .;%CLOJURE_JAR%;%CONTRIB_JAR% clojure.main %1 -- %* | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment