adding arm64 build, and improved termux installation process

* Added arm64 Linux standalone build. (No autobuilder yet.)
* Improved termux installation process.

Added git-annex-install.sh script to avoid user needing to type as much in
termux. The scope of this script is limited; runshell handles the rest.

Runshell runs termux-fix-shebang on the shell scripts. The problem is
the bundled bin/sh script, deleting that script also works, but then the
others probably use the system Android /bin/sh, which could be old or
broken or not posix or whatever. Using termux sh to run the scripts is
better.

This commit was sponsored by Eric Drechsel on Patreon.
This commit is contained in:
Joey Hess 2018-10-11 13:22:02 -04:00
parent 0691372064
commit 0240775f32
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
31 changed files with 82 additions and 17 deletions

View file

@ -0,0 +1,48 @@
#!/bin/sh
#
# Installs git-annex in termux on android.
#
# This is only a convenience script to avoid the user needing to type much
# in termux. The standalone tarball automatically adapts itself to the termux
# environment, so this script should stay as mininal as possible.
set -e
case $(uname -m) in
aarch64)
arch=arm64
;;
arm)
arch=armel
;;
x86_64)
arch=amd64
;;
x86_32)
arch=i386
;;
*)
echo "unknown architecture $(uname -m), cannot install" >&2
exit 1
;;
esac
url=https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-"$arch".tar.gz
# uncomment to use latest autobuild
#url=https://downloads.kitenet.net/git-annex/autobuild/"$arch"/git-annex-standalone-"$arch".tar.gz
echo "Installing dependencies with termux pkg manager..."
pkg install git wget tar coreutils proot
echo "Downloading git-annex..."
cd
wget -O- "$url" | tar zx
# This lets runshell finish the installation.
git-annex.linux/git-annex version
echo "git-annex is successfully installed."
echo "Now running termux-setup-storage, to let git-annex access system storage."
termux-setup-storage
echo "Installation complete."

View file

@ -9,6 +9,7 @@ dependencies and is self-contained.
* x86-64: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-amd64.tar.gz)
* x86-32, for ancient kernels: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-i386-ancient.tar.gz)
* arm: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-armel.tar.gz)
* arm64: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-arm64.tar.gz)
To use, just unpack the tarball, `cd git-annex.linux` and run `./runshell`
-- this sets up an environment where you can use `git annex`, as well