Skip to content

Instantly share code, notes, and snippets.

@mmcgrana mmcgrana/gist:875759
Created Mar 18, 2011

Embed
What would you like to do?
#!/usr/bin/env bash
if [ "$1" == "repl" ]; then
CLASSPATH=$(lein classpath)
JAVA_OPTS="$JAVA_OPTS -Duser.home=$HOME"
JLINE="jline.ConsoleRunner"
exec java $JAVA_OPTS -cp $CLASSPATH $JLINE clojure.main --repl
else
export LEIN_VERSION="1.4.2"
LEIN_PLUGINS="$(ls -1 lib/dev/*jar 2> /dev/null | tr \\n \:)"
LEIN_JAR=".lein/opt/leiningen-1.4.2-standalone.jar"
CLASSPATH="$LEIN_JAR:$LEIN_PLUGINS:test/:src/:$CLASSPATH"
exec java -client $JAVA_OPTS -Dleiningen.original.pwd=$PWD -cp "$CLASSPATH" clojure.main -e "(use 'leiningen.core)(-main)" /dev/null $@
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.