add git-remote-annex to standalone builds

Didn't add to windows installer because I don't currently have a Windows
system to test.
This commit is contained in:
Joey Hess 2024-05-28 13:12:51 -04:00
parent e9a2e4e94d
commit ce95cac195
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 58 additions and 3 deletions

View file

@ -4,7 +4,7 @@ as if you'd installed it using a package manager.
Or, you can use the runshell script in this directory to start a shell Or, you can use the runshell script in this directory to start a shell
that is configured to use git-annex and the other utilities included in that is configured to use git-annex and the other utilities included in
this bundle, including git, gpg, rsync, ssh, etc. this bundle.
This should work on any Linux system of the appropriate architecture. This should work on any Linux system of the appropriate architecture.
More or less. More or less.

View file

@ -0,0 +1,24 @@
#!/bin/sh
link="$(readlink -f "$0" 2>/dev/null || 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
fi
if [ ! -e "$base/runshell" ]; then
echo "** cannot find $base/runshell" >&2
exit 1
fi
# Get absolute path to base, to avoid breakage when things change directories.
orig="$(pwd)"
cd "$base"
base="$(pwd)"
cd "$orig"
exec "$base/runshell" git-remote-annex "$@"

View file

@ -211,7 +211,7 @@ case "$os" in
# not the bundled one. # not the bundled one.
rm -f bin/uname rm -f bin/uname
# Fix shell scripts to work when run inside proot. # Fix shell scripts to work when run inside proot.
termux-fix-shebang bin/* runshell git-annex git-annex-shell git-annex-webapp termux-fix-shebang bin/* runshell git-annex git-annex-shell git-annex-webapp git-remote-annex
cd "$orig" cd "$orig"
# Save the poor Android user the typing. # Save the poor Android user the typing.
if echo "$SHELL" | grep -q '/bash'; then if echo "$SHELL" | grep -q '/bash'; then

View file

@ -6,4 +6,4 @@ this README into your PATH.
Or, you can use the runshell script in this directory to start a shell Or, you can use the runshell script in this directory to start a shell
that is configured to use git-annex and the other utilities included in that is configured to use git-annex and the other utilities included in
this bundle, including git, gpg, rsync, ssh, etc. this bundle.

View file

@ -0,0 +1,31 @@
#!/bin/sh
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
fi
if [ ! -e "$base/runshell" ]; then
echo "** cannot find $base/runshell" >&2
exit 1
fi
# Get absolute path to base, to avoid breakage when things change directories.
orig="$(pwd)"
cd "$base"
base="$(pwd)"
cd "$orig"
# If this is a standalone app, set a variable that git-annex can use to
# install itself.
if [ -e "$base/git-annex" ]; then
GIT_ANNEX_APP_BASE="$base"
export GIT_ANNEX_APP_BASE
fi
exec "$base/runshell" git-remote-annex "$@"