summaryrefslogtreecommitdiff
path: root/launch.sh
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-06-27 23:54:37 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-06-27 23:54:50 +0100
commit7e51947f475db6ac96d6a4f05559dcd785a8bc42 (patch)
treec2d7f0e2b7dd4328cfa90ae1e480e095468efb99 /launch.sh
parent0447188eac65507d9d126f75d70e5333f435894c (diff)
downloadpoezio-7e51947f475db6ac96d6a4f05559dcd785a8bc42.tar.gz
poezio-7e51947f475db6ac96d6a4f05559dcd785a8bc42.tar.bz2
poezio-7e51947f475db6ac96d6a4f05559dcd785a8bc42.tar.xz
poezio-7e51947f475db6ac96d6a4f05559dcd785a8bc42.zip
Launch poezio as a module package.
Diffstat (limited to 'launch.sh')
-rwxr-xr-xlaunch.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/launch.sh b/launch.sh
index 267c90f4..b4beb839 100755
--- a/launch.sh
+++ b/launch.sh
@@ -1,20 +1,20 @@
#!/bin/sh
-poezio_dir=$(dirname "$0")
+cd $(dirname "$0")
if [ -z "$POEZIO_VENV" ]
then
POEZIO_VENV="poezio-venv"
fi
-if [ -d "$poezio_dir/.git" ]
+if [ -d .git ]
then
- args=$(git --git-dir="$poezio_dir/.git" show --format='%h %ci' | head -n1)
+ args=$(git show --format='%h %ci' | head -n1)
else
args="0.9-dev"
fi
-if [ -e "$poezio_dir/$POEZIO_VENV" ]
+if [ -e "$POEZIO_VENV" ]
then
- PYTHON3="$poezio_dir/$POEZIO_VENV/bin/python3"
+ PYTHON3="$POEZIO_VENV/bin/python3"
else
echo ""
echo "WARNING: Not using the up-to-date launch format"
@@ -25,5 +25,5 @@ else
fi
$PYTHON3 -c 'import sys;(print("Python 3.4 or newer is required") and exit(1)) if sys.version_info < (3, 4) else exit(0)' || exit 1
-exec "$PYTHON3" "$poezio_dir/poezio/poezio.py" -v "$args" "$@"
+exec "$PYTHON3" -m poezio -v "$args" "$@"