2014-01-11 22:08:17 -07:00
|
|
|
#!/bin/bash
|
2014-01-12 08:19:22 -07:00
|
|
|
set -e
|
2014-01-11 20:59:26 -07:00
|
|
|
|
|
|
|
# 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`
|
2014-01-11 21:13:18 -07:00
|
|
|
if [ $CURRENT_COMMIT != $COMMIT ]; then
|
2014-01-11 20:59:26 -07:00
|
|
|
# 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;
|