Small program to modify the shebang of scripts to work in a Termux environment. Typically #!/bin/sh
is replaced with #!/data/data/com.termux/files/usr/bin/sh
.
A way to tell the shell how to run a script. See the Wikipedia article for more information: Shebang (Unix).
Termux does not follow the Filesystem Hierarchy Standard, due to how Android works. Pretty much all other Linux distributions does follow the standard, and hence most scripts come with a hardcoded shebang like #!/bin/sh
or /usr/bin/env python3
. For the script to fully work Termux
See also Termux wiki: Differences from Linux.
Termux also comes with a LD_PRELOAD'ed library termux-exec which automatically translates the interpreter path before it is executed, so under many circumstances scripts with non-functional shebang does work. However, when running scripts in the addon apps (like termux-widget or termux-tasker), and under other edge-cases, this library is not loaded and the shebang needs to point to a proper program.