1
0
mirror of https://github.com/proot-me/proot.git synced 2025-02-17 10:45:53 +00:00
proot/test/test-c15999f9.sh
2019-12-19 15:37:02 -05:00

22 lines
427 B
Bash

#!/bin/sh
set -eu
if [ -z "$(command -v mcookie)" ] || \
[ -z "$(command -v mkdir)" ] || \
[ -z "$(command -v test)" ] || \
[ -z "$(command -v grep)" ] || \
[ -z "$(command -v rm)" ]; then
exit 125;
fi
TMP="/tmp/$(mcookie)"
mkdir "${TMP}"
# shellcheck disable=SC2230
"${PROOT}" -b "$(which true):${TMP}/true" "$(which true)"
# shellcheck disable=SC2086
[ ! "$(test -e ${TMP}/true)" = "0" ]
rm -fr "${TMP}"