scripts/action: do NOT sleep on KSU_NEXT

ksu next does NOT auto close
This commit is contained in:
backslashxx 2025-02-10 23:41:18 +08:00
parent 4b4f1d3c31
commit 0e52fb5e71

View File

@ -8,6 +8,14 @@ echo "[+] PlayIntegrityFix $version"
echo "[+] $(basename "$0")" echo "[+] $(basename "$0")"
printf "\n\n" printf "\n\n"
sleep_pause() {
# APatch and KernelSU needs this
# but not KSU_NEXT, MMRL
if [ -z "$MMRL" ] && [ -z "$KSU_NEXT" ] && { [ "$KSU" = "true" ] || [ "$APATCH" = "true" ]; }; then
sleep 5
fi
}
download_fail() { download_fail() {
dl_domain=$(echo "$1" | awk -F[/:] '{print $4}') dl_domain=$(echo "$1" | awk -F[/:] '{print $4}')
echo "$1" | grep -q "\.zip$" && return echo "$1" | grep -q "\.zip$" && return
@ -31,13 +39,6 @@ if command -v curl > /dev/null 2>&1; then
download() { curl --connect-timeout 10 -s "$1" > "$2" || download_fail "$1"; } download() { curl --connect-timeout 10 -s "$1" > "$2" || download_fail "$1"; }
fi fi
sleep_pause() {
# APatch and KernelSU needs this
if [ -z "$MMRL" ] && { [ "$KSU" = "true" ] || [ "$APATCH" = "true" ]; }; then
sleep 2
fi
}
set_random_beta() { set_random_beta() {
if [ "$(echo "$MODEL_LIST" | wc -l)" -ne "$(echo "$PRODUCT_LIST" | wc -l)" ]; then if [ "$(echo "$MODEL_LIST" | wc -l)" -ne "$(echo "$PRODUCT_LIST" | wc -l)" ]; then
echo "Error: MODEL_LIST and PRODUCT_LIST have different lengths." echo "Error: MODEL_LIST and PRODUCT_LIST have different lengths."