#!/bin/sh
py2=
if which python2.7 >/dev/null && \
	`which python2.7` -c 'import x84.engine' 2>/dev/null; then
	py2=`which python2.7`
elif which python2 >/dev/null && \
	`which python2` -c 'import x84.engine' 2>/dev/null; then
	py2=`which python2`
elif which python2.6 >/dev/null && \
	`which python2.6` -c 'import x84.engine' 2>/dev/null; then
	py2=`which python2.6`
elif which python >/dev/null && \
	`which python` -c 'import x84.engine' 2>/dev/null; then
	py2=`which python`
fi
issue31() {
	echo
	echo 'could not find x84 using python2.7, python2, or python2.6.'
	echo
	echo 'Call $PYTHONEXE -m x84.engine'
	echo
	echo 'where $PYTHONEXE is the same as used by pip to install "x84",'
	echo 'or ensure python is in your system PATH'
	exit 1
}
[ -z "$py2" ] && issue31
echo $py2 -m x84.engine
$py2 -m x84.engine
