# HG changeset patch # User Gilles Duboscq # Date 1364207260 -3600 # Node ID a607682f7ba652967b9479c49eb84556136b0fd5 # Parent 3393f870e6a449660f7f3e62a83986eef9606a6e mx.sh should select python2.7 python2 or python depending on what is available. Originaly contributed by Matthias Grimmer diff -r 3393f870e6a4 -r a607682f7ba6 mxtool/mx --- a/mxtool/mx Mon Mar 25 11:08:50 2013 +0100 +++ b/mxtool/mx Mon Mar 25 11:27:40 2013 +0100 @@ -37,14 +37,27 @@ exit 1 fi -python </dev/null 2>&1 +if [ $? -eq 0 ]; then + python_exe=python2.7 +else + type python2 > /dev/null 2>&1 + if [ $? -eq 0]; then + python_exe=python2 + else + python_exe=python + fi +fi + +$python_exe <