Created
December 23, 2009 17:55
-
-
Save shoover/262664 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
# A clj.sh that works on Windows in Cygwin. I just converted : to ; in the | |
# classpath. | |
# | |
# Sadly, you have to copy jars into | |
# your user clj dir; symlinks won't work with a win32 build of java.exe. | |
# Originally from http://gist.github.com/237162, and requires run.clj from there. | |
USER_CLJ_DIR=c:/Users/Shawn/.clojure | |
# Local src, test, and classes | |
CP=src/:test/:classes/ | |
# Local jars | |
if [ -d jars ]; then | |
for file in jars/*.jar; do | |
CP=$CP:$file | |
done | |
fi | |
# Global jars | |
for file in $USER_CLJ_DIR/*.jar; do | |
CP=$CP:$file | |
done | |
# For run.clj & user.clj | |
CP=$CP:$USER_CLJ_DIR/ | |
CP=${CP//:/;} | |
if [ -z "$1" ]; then | |
rlwrap java -cp $CP clojure.contrib.repl_ln | |
else | |
java -cp $CP clojure.main @run.clj $@ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment