summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvieira <vieira@yubo.be>2017-10-21 00:57:05 +0000
committerBrian May <brian@linuxpenguins.xyz>2017-10-23 06:58:21 +1100
commit94ea0a3bed2300f683f2c493985f996bd611eae2 (patch)
tree6841d533f1550cc882fd4def3dbb82fff6e0d462
parent9b7ce2811ec3ef35b9b7f7dfc157127bc46ece47 (diff)
nested if should be and
-rwxr-xr-xrun9
1 files changed, 4 insertions, 5 deletions
diff --git a/run b/run
index a14d831..675533b 100755
--- a/run
+++ b/run
@@ -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