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.

This commit is contained in:
Joey Hess 2013-12-15 15:57:41 -04:00
parent 314c246a45
commit 6be19b0070
9 changed files with 50 additions and 7 deletions

View file

@ -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

View file

@ -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

View file

@ -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