Commit 2a0282c1 authored by Maxime Perrotin's avatar Maxime Perrotin
parents 615013b3 89e4da94
......@@ -2,7 +2,25 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. ${DIR}/common.sh
# Setup speedometer library in ~/.local
cd $DIR/../speedometer || exit 1
# Skip install if the version installed is the same and the tree is clean
HEAD="$(grep version speedometer/speedometer.py | head -1 | awk -F\" '{print $(NF-1)}')"
# This is much slower than a --version option would be...
# But there's no such functionality in speedometer :-(
VERSION_INSTALLED="$(pip2 freeze | grep speedometer | awk -F= '{print $NF}')"
git status >/dev/null
TREE_CLEAN=$?
if [ ${TREE_CLEAN} -eq 0 -a "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
echo Speedometer tree is clean and already installed. Skipping Speedometer install...
exit 0
fi
# Unfortunately, the --upgrade DOES NOT ALWAYS WORK.
# Uninstall first...
echo y | pip2 uninstall speedometer
pip2 install --user --upgrade . || exit 1
# Add .local/bin to PATH
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment