fix workaround for doc8 error 97/18497/4
authorRyota MIBU <r-mibu@cq.jp.nec.com>
Wed, 10 Aug 2016 20:38:25 +0000 (05:38 +0900)
committerRyota MIBU <r-mibu@cq.jp.nec.com>
Wed, 10 Aug 2016 20:56:00 +0000 (05:56 +0900)
Change-Id: I7c31f042f5fb02d1294e4a72aef872f153c55755
Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
scripts/docs-build.sh

index e79e21c..7d8abf1 100755 (executable)
@@ -191,7 +191,8 @@ if ! which virtualenv > /dev/null ; then
 fi
 
 # workaround for doc8 error in python2.6
-if python -V | grep -q 'Python 2.6' && [ -e /usr/bin/python2.7 ] ; then
+if [[ $(python -V 2>&1) == Python\ 2.6.* ]] && [ -e /usr/bin/python2.7 ]; then
+    echo "creating venv with Python 2.7 instead of Python 2.6.x ..."
     virtualenv "$VENV_DIR" --python=/usr/bin/python2.7
 else
     virtualenv "$VENV_DIR"