0
1
mirror of https://github.com/termux/proot.git synced 2024-09-22 08:31:06 +00:00
proot/tests/test-b6df3cbe.sh
2016-08-21 07:42:00 -04:00

17 lines
361 B
Bash

if [ -z `which mcookie` ] || [ -z `which cat` ] || [ -z `which tr` ] || [ -z `which grep` ] || [ -z `which grep` ] || [ -z `which chmod` ]; then
exit 125;
fi
TMP=$(mcookie)
cat > /tmp/${TMP} <<EOF
#!/bin/sh
cat /proc/\$$/cmdline
EOF
chmod +x /tmp/${TMP}
(cd /tmp; ${PROOT} sh -c "./${TMP}") | tr '\000' ' ' | grep "^/bin/sh ./${TMP} $"
rm /tmp/${TMP}