2014-01-12 08:19:22 -07:00

21 lines
475 B
Bash

#!/bin/bash
set -e
# Which virtualenv to use.
VIRTUALENV=$1
# Commit hash to install.
COMMIT=$2
# Find out current IPython commit hash.
cd $VIRTUALENV/src/ipython
CURRENT_COMMIT=`git rev-parse HEAD`
if [ $CURRENT_COMMIT != $COMMIT ]; then
# Activate the virtualenv.
source $VIRTUALENV/bin/activate
# Update IPython.
echo "Updating IPython (this may take a while)."
pip install --upgrade -e git+https://github.com/ipython/ipython.git@$COMMIT#egg=ipython-dev
fi;