Make launch.sh runnable from any directory

This commit is contained in:
mathieui 2014-03-29 16:36:14 +01:00
parent c537485c0d
commit 42769dd28f

View file

@ -1,10 +1,10 @@
#!/bin/sh #!/bin/sh
if [ -d "$PWD/.git" ] if [ -d "$(dirname $0)/.git" ]
then then
args=$(git show --format='%h %ci' | head -n1) args=$(git --git-dir="$(dirname $0)/.git" show --format='%h %ci' | head -n1)
else else
args="0.8.3-dev" args="0.8.3-dev"
fi fi
exec python3 -OO src/poezio.py -v "$args" "$@" exec python3 -OO "$(dirname $0)/src/poezio.py" -v "$args" "$@"