summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will@willthompson.co.uk>2012-01-18 15:14:59 +0000
committerWill Thompson <will@willthompson.co.uk>2012-01-18 15:14:59 +0000
commit5a8414c658f01d91f42f0d84bfe45d995d6f1c50 (patch)
treeae88489daad28d6bf6471abb5c692c8175f8fb6e
parent34fb9898f783a886e17e72a466d1e7cc0ec4e328 (diff)
Make launcher script work when symlinked.
Previously, if you unzipped the binary package to (say) ~, and then ran ln -s ~/bustle-0.4.0-x86_64/bustle.sh ~/bin/bustle then running ~/bin/bustle would fail: /home/cassidy/bin/bustle: ligne14: /home/cassidy/bin/bin/bustle: Aucun fichier ou dossier de ce type Running `readlink -f` on ${0} makes this work.
-rwxr-xr-xbustle.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/bustle.sh b/bustle.sh
index a0fe1e9..2be1b50 100755
--- a/bustle.sh
+++ b/bustle.sh
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-root="$(dirname ${0}})"
+root="$(dirname $(readlink -f ${0}))"
bustle_datadir="${root}"
export bustle_datadir