Fix the check about the installation of virtualenv

This patch replaces the and by an or and also fix an error in the
declaration of the variable.

Change-Id: I2b05e27a5c1b286973facea768373bb92c993536
This commit is contained in:
Guillaume Thouvenin 2016-05-11 17:29:37 +02:00
parent e7ba6d4761
commit 9158cb2d31

View File

@ -4,9 +4,9 @@ BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pip install -U pip || true
VIRTUALENV_EXIST=`dpkg -l | grep python-virtualenv && pip list | grep virtualenv`
VIRTUALENV_EXIST=`dpkg -l | grep python-virtualenv || pip list | grep virtualenv`
if [[ -z "VIRTUALENV_EXIST" ]]; then
if [[ -z "${VIRTUALENV_EXIST}" ]]; then
echo 'There is no virtualnev'
pip install virtualenv || apt-get install python-virtualenv || true
fi
@ -29,4 +29,4 @@ cp "${BASE_DIR}"/MANIFEST.in ./ && cp "${BASE_DIR}"/setup.py ./
python setup.py sdist && pip install dist/fuelweb_test*.tar.gz && pip install -r "${BASE_DIR}"/../../requirements.txt
cd "${BASE_DIR}" && rm -rf tmp
cd "${BASE_DIR}" && rm -rf tmp