diff options
author | vieira <vieira@yubo.be> | 2017-10-21 00:57:05 +0000 |
---|---|---|
committer | Brian May <brian@linuxpenguins.xyz> | 2017-10-23 06:58:21 +1100 |
commit | 94ea0a3bed2300f683f2c493985f996bd611eae2 (patch) | |
tree | 6841d533f1550cc882fd4def3dbb82fff6e0d462 | |
parent | 9b7ce2811ec3ef35b9b7f7dfc157127bc46ece47 (diff) |
nested if should be and
-rwxr-xr-x | run | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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 |