poezio/launch.sh

30 lines
706 B
Bash
Raw Normal View History

2012-10-05 14:58:09 +00:00
#!/bin/sh
cd $(dirname "$(readlink -f "$0")")
if [ -z "$POEZIO_VENV" ]
then
POEZIO_VENV="poezio-venv"
fi
2010-02-01 20:28:33 +00:00
if [ -e .git ]
2014-02-22 13:27:31 +00:00
then
2016-06-27 22:54:37 +00:00
args=$(git show --format='%h %ci' | head -n1)
2014-02-22 13:27:31 +00:00
else
args="0.14-dev"
2014-02-22 13:27:31 +00:00
fi
2016-06-27 22:54:37 +00:00
if [ -e "$POEZIO_VENV" ]
then
2016-06-27 22:54:37 +00:00
PYTHON3="$POEZIO_VENV/bin/python3"
else
echo ""
echo "WARNING: Not using the up-to-date launch format"
echo "Run ./update.sh again to create a virtualenv with the deps"
echo "(or ignore this message if you don't want to)"
echo ""
PYTHON3=python3
fi
$PYTHON3 -c 'import sys;(print("Python 3.7 or newer is required") and exit(1)) if sys.version_info < (3, 7) else exit(0)' || exit 1
exec "$PYTHON3" -m poezio --custom-version "$args" "$@"
2011-02-26 13:16:19 +00:00