From 42769dd28feaf82ff3b803395d3f563188ab1484 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sat, 29 Mar 2014 16:36:14 +0100 Subject: [PATCH] Make launch.sh runnable from any directory --- launch.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/launch.sh b/launch.sh index 5919e814..4fddeb10 100755 --- a/launch.sh +++ b/launch.sh @@ -1,10 +1,10 @@ #!/bin/sh -if [ -d "$PWD/.git" ] +if [ -d "$(dirname $0)/.git" ] then - args=$(git show --format='%h %ci' | head -n1) + args=$(git --git-dir="$(dirname $0)/.git" show --format='%h %ci' | head -n1) else args="0.8.3-dev" fi -exec python3 -OO src/poezio.py -v "$args" "$@" +exec python3 -OO "$(dirname $0)/src/poezio.py" -v "$args" "$@"