Skip to content

Instantly share code, notes, and snippets.

@weissjeffm
Created November 29, 2010 01:58
Show Gist options
  • Save weissjeffm/719493 to your computer and use it in GitHub Desktop.
Save weissjeffm/719493 to your computer and use it in GitHub Desktop.
Shell script to install and run clojure labrepl (on rpm based linux)
#!/bin/bash
echo "Trying clojure!"
if ! sudo -S true < /dev/null &>/dev/null; then
echo "You need sudo permission to run this script."
exit 1
fi
LEIN=/usr/local/bin/lein
if ! which lein; then
echo "Installing leiningen build tool..."
sudo wget --no-check-certificate -O $LEIN http://github.com/technomancy/leiningen/raw/stable/bin/lein
sudo chmod 755 $LEIN
fi
echo "Checking for rlwrap..."
if ! which rlwrap; then
echo "No rlwrap found, yum installing..."
sudo yum install rlwrap
fi
WORKSPACE=/tmp
LABREPL=$WORKSPACE/labrepl
cd $WORKSPACE
if [ ! -e $LABREPL ]; then
echo "Checking out labrepl..."
git clone git://github.com/relevance/labrepl.git
fi
cd $LABREPL
echo "Building labrepl in `pwd`..."
$LEIN deps
echo "Starting labrepl..."
script/repl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment