Created
March 9, 2011 14:02
-
-
Save kyleburton/862226 to your computer and use it in GitHub Desktop.
Attempts to run Swank regardless of project type (Lein, Maven).
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
function swank () { | |
PORT="${1:-4005}" | |
if [ -e project.clj ]; then | |
slime-connect & ## see gist: https://gist.github.com/866324 | |
lein deps; lein swank "$PORT" | |
elif [ -e pom.xml ]; then | |
slime-connect & | |
if [ -e patch.dev.pom.xml.patch ]; then | |
cp pom.xml dev.pom.xml | |
patch -p0 < patch.dev.pom.xml.patch | |
mvn -Dclojure.swank.port=$PORT -f dev.pom.xml clojure:swank | |
else | |
mvn -Dclojure.swank.port=$PORT clojure:swank | |
fi | |
else | |
echo "Sorry: don't know how to run a swank server in $(pwd)" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment