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

3
debian/changelog vendored
View file

@ -4,6 +4,9 @@ git-annex (5.20131214) UNRELEASED; urgency=low
* Add plumbing-level lookupkey and examinekey commands. * Add plumbing-level lookupkey and examinekey commands.
* find --format: Added hashdirlower, hashdirmixed, keyname, and mtime * find --format: Added hashdirlower, hashdirmixed, keyname, and mtime
format variables. format variables.
* 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.
-- Joey Hess <joeyh@debian.org> Sun, 15 Dec 2013 13:32:49 -0400 -- Joey Hess <joeyh@debian.org> Sun, 15 Dec 2013 13:32:49 -0400

View file

@ -12,7 +12,8 @@ To use, just unpack the tarball, `cd git-annex.linux` and run `./runshell`
as everything else included in the bundle. as everything else included in the bundle.
Alternatively, you can unpack the tarball, and add the directory to your Alternatively, you can unpack the tarball, and add the directory to your
`PATH`. This lets you use `git annex`, without overriding your system's `PATH`, or symlink the programs in the directory to a directory in your
PATH. This lets you use `git annex`, without overriding your system's
own versions of git, etc. own versions of git, etc.
Warning: This is a last resort. Most Linux users should instead Warning: This is a last resort. Most Linux users should instead

View file

@ -17,3 +17,6 @@ Symlink this script to `~/.local/bin/git-annex`, `~/.local/bin/git-annex-shell`
The script will detect the installation directory using `readlink`. Both absolute and relative links works. Then it starts the correct script depending on the basename of the link. The script will detect the installation directory using `readlink`. Both absolute and relative links works. Then it starts the correct script depending on the basename of the link.
It should be possible to link the `git-annex`, `git-annex-webapp` and `git-annex-shell` scripts instead if they used `readlink` to find out the location of the prebuilt package. It should be possible to link the `git-annex`, `git-annex-webapp` and `git-annex-shell` scripts instead if they used `readlink` to find out the location of the prebuilt package.
> I've made the scripts look at readlink, so [[done]].
> --[[Joey]]

View file

@ -1,5 +1,11 @@
#!/bin/sh #!/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 if [ ! -d "$base" ]; then
echo "** cannot find base directory (I seem to be $0)" >&2 echo "** cannot find base directory (I seem to be $0)" >&2
exit 1 exit 1

View file

@ -1,5 +1,11 @@
#!/bin/sh #!/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 if [ ! -d "$base" ]; then
echo "** cannot find base directory (I seem to be $0)" >&2 echo "** cannot find base directory (I seem to be $0)" >&2
exit 1 exit 1

View file

@ -1,5 +1,11 @@
#!/bin/sh #!/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 if [ ! -d "$base" ]; then
echo "** cannot find base directory (I seem to be $0)" >&2 echo "** cannot find base directory (I seem to be $0)" >&2
exit 1 exit 1

View file

@ -1,5 +1,11 @@
#!/bin/sh #!/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 if [ ! -d "$base" ]; then
echo "** cannot find base directory (I seem to be $0)" >&2 echo "** cannot find base directory (I seem to be $0)" >&2
exit 1 exit 1

View file

@ -1,5 +1,11 @@
#!/bin/sh #!/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 if [ ! -d "$base" ]; then
echo "** cannot find base directory (I seem to be $0)" >&2 echo "** cannot find base directory (I seem to be $0)" >&2
exit 1 exit 1

View file

@ -1,5 +1,11 @@
#!/bin/sh #!/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 if [ ! -d "$base" ]; then
echo "** cannot find base directory (I seem to be $0)" >&2 echo "** cannot find base directory (I seem to be $0)" >&2
exit 1 exit 1