Created
September 6, 2011 08:51
-
-
Save bizenn/1197002 to your computer and use it in GitHub Desktop.
swank-clojure easy wrapper script.
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
#!/bin/sh | |
# swank-clojure easy wrapper | |
# This requires lein deps or mvn deps. | |
DEST=$1 | |
if [ -z ${DEST} ]; then | |
DEST=. | |
fi | |
cd ${DEST} | |
if [ -f project.clj ]; then | |
exec env \ | |
LANG=ja_JP.UTF-8 \ | |
JAVA_OPTS="-Dswank.encoding=utf-8-unix -Dfile.encoding=UTF-8" \ | |
lein swank | |
elif [ -f pom.xml ]; then | |
exec env \ | |
LANG=ja_JP.UTF-8 \ | |
MAVEN_OPTS="${MAVEN_OPTS} -Dclojure.swank.encoding=utf-8-unix -Dfile.encoding=UTF-8" \ | |
mvn clojure:swank | |
else | |
echo "You can specify only a project directory including \"project.clj\" or \"pom.xml\"." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment