Launch script for clojure
Yesterday I was trying to get the clojure web framework compojure running, but I had some troubles. It seems that the version of clojure I was running wasn’t compatible with the latest and greatest compojure off github, or that I hadn’t included all jars needed. I found a tip on one of the comments here for specifying a folder where all jars are included which takes the pain out of adding each jar singlehandedly. So I have now adapted my script to start clojure which was taken from http://mark.reid.name/sap/setting-up-clojure.html, but changed so that it includes a full folder’s worth of jars instead of specifying each jar by itself.
Here’s my new launch script for clojure:
#!/bin/bash JAVA=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java EXT_DIRS=$HOME/local/clojure # Add extra folders as specified by `.clojure_libs` file if [ -f .clojure_libs ] then EXT_DIRS=$EXT_DIRS:`cat .clojure_libs` fi if [ -z "$1" ]; then $JAVA -server -Djava.ext.dirs=$EXT_DIRS \ jline.ConsoleRunner clojure.lang.Repl else scriptname=$1 $JAVA -server -Djava.ext.dirs=$EXT_DIRS clojure.lang.Script $scriptname -- $* fi
Now that I have a working base default setup of compojure it is time to start writing something useful! Will need to make slime work without hiccups too.