3 if ! which git || ! which g++ || ! which scons || ! which make ; then
4 sudo apt-get -y install make g++ scons git-core || exit -4
7 if [ ! -e ~/include/gtest/gtest.h ]; then
11 wget -c http://googletest.googlecode.com/files/gtest-1.4.0.tar.bz2 || exit -2
13 tar -xjf gtest-1.4.0.tar.bz2 || exit -1
14 cd gtest-1.4.0 || exit 1
15 ./configure --prefix=$HOME || exit 2
17 make install || exit 4
21 #if ! which pcregrep ; then
22 # echo installing pcregrep
25 # wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.01.tar.gz || exit 5
26 # tar -xzf pcre-8.01.tar.gz
28 # ./configure --prefix=$HOME || exit 6
30 # make install || exit 8
34 if [ ! -e swift ]; then
36 git clone $ORIGIN || exit 6
40 git pull origin $BRANCH:$BRANCH || exit 5
41 echo switching the branch
42 git checkout $BRANCH || exit 5
45 CPPPATH=~/include LIBPATH=~/lib scons -j4 || exit 7
47 tests/connecttest || exit 8