Monty Taylor 5195c75940 Oddly enough, our mirror doesn't have pip.
Change-Id: I976a137280da2ac3184a98bd1f38131e6442f1f1
2012-07-08 14:28:52 -05:00

29 lines
932 B
Bash

#!/bin/bash
# This file is managed by puppet.
# https://github.com/openstack/openstack-ci-puppet
export PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip}
export PIP_TEMP_DOWNLOAD=${PIP_TEMP_DOWNLOAD:-/var/lib/pip-download}
project=$1
pip_command='/usr/local/bin/pip install -M -U -I --exists-action=w --no-install'
cd ${PIP_TEMP_DOWNLOAD}
if [ ! -d ${project} ] ; then
git clone git://github.com/openstack/${project}.git ${project} >/dev/null 2>&1
fi
cd ${project}
$pip_command pip
git fetch origin
for branch in `git branch -a | grep remotes.origin | grep -v origin.HEAD | awk '{print $1}' ` ; do
git reset --hard $branch
git clean -x -f -d -q
echo "*********************"
echo "Fetching pip requires for $project:$branch"
for requires_file in tools/pip-requires tools/test-requires ; do
if [ -f ${requires_file} ] ; then
$pip_command -r $requires_file
fi
done
done