CC-3039: Install script doesnt check whether virtualenv exists (Ubuntu 11.10)
-fixed -moved virtualenv version check into virtualenv-install.sh
This commit is contained in:
parent
c19b7f7c6e
commit
2fc46cd29b
2 changed files with 21 additions and 15 deletions
|
@ -4,6 +4,27 @@ SCRIPT=`readlink -f $0`
|
|||
# Absolute directory this script is in
|
||||
SCRIPTPATH=`dirname $SCRIPT`
|
||||
|
||||
which virtualenv > /dev/null
|
||||
if [ "$?" -ne "0" ]; then
|
||||
echo "virtualenv not found!"
|
||||
echo -e "Please install virtualenv and retry Airtime installation.\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#Check whether version of virtualenv is <= 1.4.8. If so exit install.
|
||||
BAD_VERSION="1.4.8"
|
||||
VERSION=$(virtualenv --version)
|
||||
NEWEST_VERSION=$(echo -e "$BAD_VERSION\n$VERSION\n'" | sort -t '.' -g | tail -n 1)
|
||||
echo -n "Ensuring python-virtualenv version > $BAD_VERSION..."
|
||||
if [[ "$NEWEST_VERSION" = "$BAD_VERSION" ]]; then
|
||||
URL="http://apt.sourcefabric.org/pool/main/p/python-virtualenv/python-virtualenv_1.4.9-3_all.deb"
|
||||
echo "Failed!"
|
||||
echo "You have version $BAD_VERSION or older installed. Please install package at $URL first and then try installing Airtime again."
|
||||
exit 1
|
||||
else
|
||||
echo "Success!"
|
||||
fi
|
||||
|
||||
VIRTUAL_ENV_DIR="/usr/lib/airtime/airtime_virtualenv"
|
||||
VIRTUAL_ENV_SHARE="/usr/share/python-virtualenv/"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue