diff --git a/doc/Android.mdwn b/doc/Android.mdwn index 0ac198518e..22b03a08fd 100644 --- a/doc/Android.mdwn +++ b/doc/Android.mdwn @@ -14,7 +14,7 @@ to install it. Paste these commands into Termux: pkg install wget wget https://git-annex.branchable.com/install/Android/git-annex-install - sh git-annex-install + source git-annex-install ## Starting git-annex diff --git a/doc/bugs/Android_installation_is_missing___36__PATH_setup.mdwn b/doc/bugs/Android_installation_is_missing___36__PATH_setup.mdwn index f092915d52..a0c55ffad3 100644 --- a/doc/bugs/Android_installation_is_missing___36__PATH_setup.mdwn +++ b/doc/bugs/Android_installation_is_missing___36__PATH_setup.mdwn @@ -88,3 +88,5 @@ git: 'annex' is not a git command. See 'git --help'. ### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders) Yes, lots of luck over the years :-) This is the final little tweak required to get it working for me on Android. + +> [[fixed|done]] --[[Joey]] diff --git a/doc/bugs/Android_installation_is_missing___36__PATH_setup/comment_1_cf0e167e2da279a20c5b71f9962d05a0._comment b/doc/bugs/Android_installation_is_missing___36__PATH_setup/comment_1_cf0e167e2da279a20c5b71f9962d05a0._comment index 61c806080a..fa1771097b 100644 --- a/doc/bugs/Android_installation_is_missing___36__PATH_setup/comment_1_cf0e167e2da279a20c5b71f9962d05a0._comment +++ b/doc/bugs/Android_installation_is_missing___36__PATH_setup/comment_1_cf0e167e2da279a20c5b71f9962d05a0._comment @@ -3,14 +3,15 @@ subject="""comment 1""" date="2018-10-22T17:04:18Z" content=""" -runshell contains code that puts it in PATH when run on termux. -That relies on termux's `uname -o` reporting "Android". + Running on Android.. Adding git-annex to PATH for you, and tuning for optimal behavior. -I'm fairly sure I tested that code when I added it, and it worked at the -time. -[[!commit d14983ee68ac553f3a49e9148ed193fbae722bb8]] may be related, -but I don't think so. +That means it should have updated ~/.profile to set PATH appropriate. -It should not be hard to debug -git-annex.linux/runshell, since it's a shell script and you can run it `set -x` -"""]] +The problem is the new git-annex-install script, when it exits, dumps the +user back into the shell they were in before, and that shell has not gotten +its path updated. And without sourcing the download script into the current +shell, it has no way to update the path. + +I suppose the best thing is to ask the user to source the script, and then +the script can set PATH. Which I've now done. +""]] diff --git a/doc/install/Android/git-annex-install b/doc/install/Android/git-annex-install index ad835fe132..aebd41de9d 100755 --- a/doc/install/Android/git-annex-install +++ b/doc/install/Android/git-annex-install @@ -5,6 +5,9 @@ # 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. +# +# This script needs to be sourced into the current termux shell, rather +# than run with a new shell, so it can set the PATH to include git-annex. set -e @@ -45,4 +48,8 @@ echo "git-annex is successfully installed." echo "Now running termux-setup-storage, to let git-annex access system storage." termux-setup-storage +# Add to PATH of shell that sourced this, so the user can immediately +# start using git-annex. +PATH="$PATH:`pwd`/git-annex.linux" + echo "Installation complete."