summaryrefslogtreecommitdiff
path: root/standalone/osx/git-annex.app
diff options
context:
space:
mode:
Diffstat (limited to 'standalone/osx/git-annex.app')
-rwxr-xr-xstandalone/osx/git-annex.app/Contents/MacOS/git-annex8
-rwxr-xr-xstandalone/osx/git-annex.app/Contents/MacOS/git-annex-shell8
-rwxr-xr-xstandalone/osx/git-annex.app/Contents/MacOS/git-annex-webapp8
3 files changed, 21 insertions, 3 deletions
diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-annex b/standalone/osx/git-annex.app/Contents/MacOS/git-annex
index 452a46694..bb82a2bd9 100755
--- a/standalone/osx/git-annex.app/Contents/MacOS/git-annex
+++ b/standalone/osx/git-annex.app/Contents/MacOS/git-annex
@@ -1,5 +1,11 @@
#!/bin/sh
-base="$(dirname "$0")"
+link="$(readlink "$0")" || true
+if [ -n "$link" ]; then
+ base="$(dirname "$link")"
+else
+ base="$(dirname "$0")"
+fi
+
if [ ! -d "$base" ]; then
echo "** cannot find base directory (I seem to be $0)" >&2
exit 1
diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-annex-shell b/standalone/osx/git-annex.app/Contents/MacOS/git-annex-shell
index 9e8c0ad69..29ebc2588 100755
--- a/standalone/osx/git-annex.app/Contents/MacOS/git-annex-shell
+++ b/standalone/osx/git-annex.app/Contents/MacOS/git-annex-shell
@@ -1,5 +1,11 @@
#!/bin/sh
-base="$(dirname "$0")"
+link="$(readlink "$0")" || true
+if [ -n "$link" ]; then
+ base="$(dirname "$link")"
+else
+ base="$(dirname "$0")"
+fi
+
if [ ! -d "$base" ]; then
echo "** cannot find base directory (I seem to be $0)" >&2
exit 1
diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-annex-webapp b/standalone/osx/git-annex.app/Contents/MacOS/git-annex-webapp
index 37a4984af..7ff18bada 100755
--- a/standalone/osx/git-annex.app/Contents/MacOS/git-annex-webapp
+++ b/standalone/osx/git-annex.app/Contents/MacOS/git-annex-webapp
@@ -1,5 +1,11 @@
#!/bin/sh
-base="$(dirname "$0")"
+link="$(readlink "$0")" || true
+if [ -n "$link" ]; then
+ base="$(dirname "$link")"
+else
+ base="$(dirname "$0")"
+fi
+
if [ ! -d "$base" ]; then
echo "** cannot find base directory (I seem to be $0)" >&2
exit 1