Check MAGISKBIN/magiskpolicy

This commit is contained in:
vvb2060 2022-03-23 00:53:06 +08:00 committed by John Wu
parent 9a11412719
commit 2fb46a11dc

View File

@ -8,8 +8,11 @@ run_delay() {
env_check() {
for file in busybox magiskboot magiskinit util_functions.sh boot_patch.sh; do
[ -f $MAGISKBIN/$file ] || return 1
[ -f "$MAGISKBIN/$file" ] || return 1
done
if [ "$2" -ge 24302 ]; then
[ -f "$MAGISKBIN/magiskpolicy" ] || return 1
fi
grep -xqF "MAGISK_VER='$1'" "$MAGISKBIN/util_functions.sh" || return 1
grep -xqF "MAGISK_VER_CODE=$2" "$MAGISKBIN/util_functions.sh" || return 1
return 0