From 9b4dff44c3ac3cf04ad133123d25ae05bcb4511c Mon Sep 17 00:00:00 2001 From: Fulvio Esposito Date: Fri, 22 Nov 2019 12:26:14 +0100 Subject: [PATCH] Drop double square brackets tests in install script (#718) sh doesn't support double square brackets tests which are a bash feature. This commit replace them with single square brackets tests --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 852afa6c..726c97ec 100755 --- a/scripts/install +++ b/scripts/install @@ -1,12 +1,12 @@ #!/bin/sh -e # Use the Python executable provided from the `-p` option, or a default. -[[ $1 = "-p" ]] && PYTHON=$2 || PYTHON="python3" +[ "$1" = "-p" ] && PYTHON=$2 || PYTHON="python3" MIN_VERSION="(3, 6)" VERSION_OK=`"$PYTHON" -c "import sys; print(sys.version_info[0:2] >= $MIN_VERSION and '1' or '');"` -if [[ -z "$VERSION_OK" ]] ; then +if [ -z "$VERSION_OK" ] ; then PYTHON_VERSION=`"$PYTHON" -c "import sys; print('%s.%s' % sys.version_info[0:2]);"` DISP_MIN_VERSION=`"$PYTHON" -c "print('%s.%s' % $MIN_VERSION)"` echo "ERROR: Python $PYTHON_VERSION detected, but $DISP_MIN_VERSION+ is required."