timewarrior: Enable package
[termux-packages] / packages / termux-tools / su
CommitLineData
0ee44735
FF
1#!/data/data/com.termux/files/usr/bin/sh
2
3ROOT_SHELL=$PREFIX/bin/bash
4if test -x "$HOME/.termux/shell"; then ROOT_SHELL=`readlink -f $HOME/.termux/shell`; fi
5c7e02d7 5
a5421dbd
FF
6for p in /system/xbin/su /su/bin/su
7do
8 if [ -x $p ]; then
0ee44735
FF
9 # The su tool may require programs in PATH:
10 PATH=$PATH:/su/bin:/su/xbin:/system/bin:/system/xbin \
11 exec $p \
12 --preserve-environment \
13 -c "LD_LIBRARY_PATH=$PREFIX/lib $ROOT_SHELL"
a5421dbd
FF
14 fi
15done
16
17echo "There is no su program on this device. Termux"
18echo "does not supply tools for rooting, see e.g."
19echo "http://www.androidcentral.com/root for"
20echo "information about rooting Android."
21exit 1