Android: Improve installation process when the user's login shell is not bash.

~/.profile works for bash, but not all other login shells.

This setting PATH is a minor convenience for users, particuarly since
typing on android is so much harder. The usual linux standalone bundle
just expects the user to know how to add it to PATH. I don't want this
code to grow special cases for every possible login shell. So displaying a
message to the presumably minority who don't use bash seems like the best
choice.

Longer term, I'd hope termux gets some way to set an environment variable
for all login shells. Systems using PAM can, via ~/.pam_environment. Or
alternatively, add a git-annex package to termux, even if just an installer
package. I'd rather spend time on either of those than on making this minor
thing support more login shells.

This commit was sponsored by mo on Patreon.
This commit is contained in:
Joey Hess 2019-05-23 13:06:20 -04:00
parent a14f6ce758
commit f2a54e3401
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 14 additions and 3 deletions

View file

@ -29,3 +29,7 @@ git: 'annex' is not a git command. See 'git --help'.
Yes, been using it for many years and couldn't live without it.
[[!meta title="termux install adds git-annex only to bash path, not zsh etc"]]
> made it detect when the login shell is not bash, and rather than add to
> .profile, print out a message letting the user know what they need to
> add to their shell's path [[done]]