From 84f7dab35401c896e426b49ca5e95b5a9b4952ab Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 15 Dec 2013 15:57:41 -0400 Subject: Programs from Linux and OSX standalone builds can now be symlinked into a directory in PATH as an alternative installation method, and will use readlink to find where the build was unpacked. --- standalone/osx/git-annex.app/Contents/MacOS/git-annex-webapp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'standalone/osx/git-annex.app/Contents/MacOS/git-annex-webapp') 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 -- cgit v1.2.3