termux-tools: Search in more places for su
This commit is contained in:
parent
22797e2894
commit
a5421dbdf6
@ -1,6 +1,6 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://termux.com/
|
||||
TERMUX_PKG_DESCRIPTION="Some tools for Termux"
|
||||
TERMUX_PKG_VERSION=0.21
|
||||
TERMUX_PKG_VERSION=0.22
|
||||
|
||||
termux_step_make_install () {
|
||||
$CXX $CFLAGS $LDFLAGS -std=c++14 -Wall -Wextra -pedantic -Werror $TERMUX_PKG_BUILDER_DIR/*.cpp -o $TERMUX_PREFIX/bin/termux-elf-cleaner
|
||||
|
@ -1,12 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -x /system/xbin/su ]; then
|
||||
# The su tool may require programs from /system/bin in path:
|
||||
PATH=/system/bin:$PATH /system/xbin/su $@
|
||||
else
|
||||
echo "There is no su program on this device. Termux"
|
||||
echo "does not supply tools for rooting, see e.g."
|
||||
echo "http://www.androidcentral.com/root for"
|
||||
echo "information about rooting Android."
|
||||
exit 1
|
||||
fi
|
||||
for p in /system/xbin/su /su/bin/su
|
||||
do
|
||||
if [ -x $p ]; then
|
||||
# The su tool may require programs
|
||||
# from /system/bin in path:
|
||||
PATH=/system/bin:$PATH exec $p $@
|
||||
fi
|
||||
done
|
||||
|
||||
echo "There is no su program on this device. Termux"
|
||||
echo "does not supply tools for rooting, see e.g."
|
||||
echo "http://www.androidcentral.com/root for"
|
||||
echo "information about rooting Android."
|
||||
exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user