Skip to content

Instantly share code, notes, and snippets.

@abma
Created March 21, 2012 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abma/2150455 to your computer and use it in GitHub Desktop.
Save abma/2150455 to your computer and use it in GitHub Desktop.
spring install script
#!/bin/sh
set -e
if [ $# -eq 0 ]; then
echo Usage: $0 path/to/install [git revision]
exit 1
fi
if [ $# -eq 2 ]; then
REVISION='origin/master'
else
REVISION=$2
fi
INSTPATH=$1
REPO=/tmp/spring
if [ -d $REPO/.git ]; then
cd $REPO
git fetch
else
git clone git://github.com/spring/spring.git $REPO
fi
cd $REPO
git clean -f -d
git reset --hard $REVISION
cmake . -DCMAKE_INSTALL_PREFIX=$INSTPATH
make -j2 install-spring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment