diff --git a/python/bin/gherkin b/python/bin/gherkin index b211ef27f..ce7f5bedf 100755 --- a/python/bin/gherkin +++ b/python/bin/gherkin @@ -1,18 +1,13 @@ #!/usr/bin/env sh -# Use "make GHERKIN_PYTHON_VERSION=python2 ..." to use python2 if [ -z "$GHERKIN_PYTHON_VERSION" ]; then - if [ -x "$(command -v python)" ] - then - GHERKIN_PYTHON_VERSION=python - elif [ -x "$(command -v python3)" ] + if [ -x "$(command -v python3)" ] then GHERKIN_PYTHON_VERSION=python3 - elif [ -x "$(command -v python2)" ] + elif [ -x "$(command -v python)" ] then - GHERKIN_PYTHON_VERSION=python2 - else - echo "Neiter python, python3 or python2 found on PATH, exiting" + GHERKIN_PYTHON_VERSION=python + echo "Neither python3 or python found on PATH, exiting" exit 1 fi fi diff --git a/python/bin/gherkin-generate-tokens b/python/bin/gherkin-generate-tokens index 04e102f20..61ea45a27 100755 --- a/python/bin/gherkin-generate-tokens +++ b/python/bin/gherkin-generate-tokens @@ -1,18 +1,13 @@ #!/usr/bin/env sh -# Use "make GHERKIN_PYTHON_VERSION=python2 ..." to use python2 if [ -z "$GHERKIN_PYTHON_VERSION" ]; then - if [ -x "$(command -v python)" ] - then - GHERKIN_PYTHON_VERSION=python - elif [ -x "$(command -v python3)" ] + if [ -x "$(command -v python3)" ] then GHERKIN_PYTHON_VERSION=python3 - elif [ -x "$(command -v python2)" ] + elif [ -x "$(command -v python)" ] then - GHERKIN_PYTHON_VERSION=python2 - else - echo "Neiter python, python3 or python2 found on PATH, exiting" + GHERKIN_PYTHON_VERSION=python + echo "Neither python3 or python found on PATH, exiting" exit 1 fi fi