Skip to content

Instantly share code, notes, and snippets.

@mmcgrana
Created March 18, 2011 07:59
Show Gist options
  • Save mmcgrana/875759 to your computer and use it in GitHub Desktop.
Save mmcgrana/875759 to your computer and use it in GitHub Desktop.
#!/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