provision: Fix shell quoting and whitespace.

This commit is contained in:
Tim Abbott 2017-08-17 10:41:23 -07:00
parent 3b95af3b63
commit a744fd9316

View file

@ -15,18 +15,18 @@ if [[ "$OSTYPE" == "cygwin" ]]; then
VENVBINDIR="Scripts" VENVBINDIR="Scripts"
fi fi
source $BASEDIR/zulip-api-py2-venv/$VENVBINDIR/activate source "$BASEDIR/zulip-api-py2-venv/$VENVBINDIR/activate"
RVAL=$? RVAL=$?
if [ $RVAL -ne 0 ]; then if [ "$RVAL" -ne 0 ]; then
echo "Failed to activate virtualenv." echo "Failed to activate virtualenv."
exit exit
fi fi
# Install python dependencies if needed. # Install python dependencies if needed.
cmp $BASEDIR/zulip-api-py2-venv/installed-requirements.txt requirements.txt 2>/dev/null cmp "$BASEDIR/zulip-api-py2-venv/installed-requirements.txt" requirements.txt 2>/dev/null
RVAL=$? # Return value of the comparision. 0 means files are same. RVAL=$? # Return value of the comparision. 0 means files are same.
if [ $RVAL -ne 0 ]; then if [ "$RVAL" -ne 0 ]; then
pip install -r $BASEDIR/requirements.txt pip install -r "$BASEDIR/requirements.txt"
cp requirements.txt $BASEDIR/zulip-api-py2-venv/installed-requirements.txt cp requirements.txt "$BASEDIR/zulip-api-py2-venv/installed-requirements.txt"
echo "Requirements installed." echo "Requirements installed."
fi fi