#!/bin/bash
#
# git branch -r --points-at and maybe more need git > 1.9.1
#
sudo apt-get install -y software-properties-common
sudo add-apt-repository --yes ppa:git-core/ppa
sudo apt-get update
sudo apt-get install -y git
#
# Install teuthology and the packages required by teuthology.
#
git submodule sync
git submodule update --force --init --recursive
#
# the virtualenv created by teuthology is populated but ignored
# the bootstrap script is only useful to figure out which system
# packages must be installed
#
( cd teuthology ; git clean -ffqdx ; ./bootstrap install )
#
# create our own virtualenv
#
rm -fr virtualenv .tox
virtualenv virtualenv
source virtualenv/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools
pip install -r requirements.txt
pip install -e teuthology
pip install -e .
pip install tox
