nested if should be and

This commit is contained in:
vieira 2017-10-21 00:57:05 +00:00 committed by Brian May
parent 9b7ce2811e
commit 94ea0a3bed

9
run
View File

@ -1,12 +1,11 @@
#!/usr/bin/env sh
set -e
set -ex
export PYTHONPATH="$(dirname $0):$PYTHONPATH"
python_best_version() {
if [ -x "$(command -v python3)" ]; then
if python3 -c "import sys; sys.exit(not sys.version_info > (3, 5))"; then
exec python3 "$@"
fi
if [ -x "$(command -v python3)" ] &&
python3 -c "import sys; sys.exit(not sys.version_info > (3, 5))"; then
exec python3 "$@"
elif [ -x "$(command -v python2.7)" ]; then
exec python2.7 "$@"
else