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.
This commit is contained in:
kaliko 2021-01-30 11:01:20 +01:00
parent 9f1e80cd5c
commit 262583133e

View file

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
cd $(dirname "$0") cd $(dirname "$(readlink -f "$0")")
if [ -z "$POEZIO_VENV" ] if [ -z "$POEZIO_VENV" ]
then then
POEZIO_VENV="poezio-venv" POEZIO_VENV="poezio-venv"