Created
October 7, 2009 00:43
-
-
Save jakemcc/203611 to your computer and use it in GitHub Desktop.
Bash script which setups a simple clojure environment in $HOME/opt/clojure
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
#!/usr/bin/env bash | |
CLOJURE_DIR=$HOME/opt/clojure | |
JAR_DIR=$HOME/opt/clojure/jars | |
mkdir -p $CLOJURE_DIR | |
cd $CLOJURE_DIR | |
# Get latest version of clojure and compile it | |
git clone git://github.com/richhickey/clojure.git | |
cd clojure | |
ant | |
cd $CLOJURE_DIR | |
# Get latest clojure-contrib and build | |
git clone git://github.com/richhickey/clojure-contrib.git | |
cd clojure-contrib | |
ant -Dclojure.jar=$CLOJURE_DIR/clojure/clojure.jar | |
cd $CLOJURE_DIR | |
#get jline-0.9.94 and setup | |
wget http://downloads.sourceforge.net/project/jline/jline/0.9.94/jline-0.9.94.zip | |
unzip jline-0.9.94.zip | |
# Setup directory with links to important jars | |
mkdir -p $JAR_DIR | |
ln -s $HOME/opt/clojure/jline-0.9.94/jline-0.9.94.jar $JAR_DIR/jline.jar | |
ln -s $HOME/opt/clojure/clojure/clojure.jar $JAR_DIR/clojure.jar | |
ln -s $HOME/opt/clojure/clojure-contrib/clojure-contrib.jar $JAR_DIR/clojure-contrib.jar | |
# Setup clj script | |
cat > $CLOJURE_DIR/clj << End-Of-Message | |
#!/usr/bin/env bash | |
java -cp $JAR_DIR/jline.jar:$JAR_DIR/clojure-contrib.jar:$JAR_DIR/clojure.jar jline.ConsoleRunner clojure.main \$* | |
End-Of-Message | |
chmod +x $CLOJURE_DIR/clj |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment