0
1
mirror of https://github.com/termux/proot.git synced 2024-11-11 13:49:26 +00:00
proot/tests/test-1743dd3d.sh
2016-08-21 07:42:00 -04:00

18 lines
394 B
Bash

if [ ! -x ${ROOTFS}/bin/true ] || [ -z `which mcookie` ] || [ -z `which mkdir` ] || [ -z `which echo` ] || [ -z `which chmod` ]; then
exit 125;
fi
TMP=/tmp/`mcookie`
rm -f ${ROOTFS}/${TMP}
mkdir -p ${ROOTFS}/tmp
echo '#!/bin/true' > ${ROOTFS}/${TMP}
chmod -x ${ROOTFS}/${TMP}
! ${PROOT} -r ${ROOTFS} ${TMP}
chmod +x ${ROOTFS}/${TMP}
${PROOT} -r ${ROOTFS} ${TMP}
rm -f ${ROOTFS}/${TMP}