summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaliko <kaliko@azylum.org>2021-01-30 11:01:20 +0100
committerkaliko <kaliko@azylum.org>2021-01-30 11:01:20 +0100
commit262583133e4965977b8340eb9ae125f7ad5c1751 (patch)
treec6e43c6508592924424bd681f732c038235e8315
parent9f1e80cd5ccb8e9eade8239d1c37b27a69ed11e3 (diff)
downloadpoezio-262583133e4965977b8340eb9ae125f7ad5c1751.tar.gz
poezio-262583133e4965977b8340eb9ae125f7ad5c1751.tar.bz2
poezio-262583133e4965977b8340eb9ae125f7ad5c1751.tar.xz
poezio-262583133e4965977b8340eb9ae125f7ad5c1751.zip
Dereference potential linked launch.sh file
It can be useful to have launch.sh linked somewhere outside the repository clone. For instance to expose launch.sh in the $PATH. Exposing launch.sh with a symbolic link outside the git repository breaks poezio execution through launch.sh. “ cd dirname "$0" ” will get to the directory holding the link and not within the git repository.
-rwxr-xr-xlaunch.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/launch.sh b/launch.sh
index 14d8c071..57537631 100755
--- a/launch.sh
+++ b/launch.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-cd $(dirname "$0")
+cd $(dirname "$(readlink -f "$0")")
if [ -z "$POEZIO_VENV" ]
then
POEZIO_VENV="poezio-venv"