From 11f2d6039b7f49dd3f9b5f64bd1a6b64f3496544 Mon Sep 17 00:00:00 2001 From: Atopes Sayuri <108107785+AtopesSayuri@users.noreply.github.com> Date: Tue, 4 Jun 2024 22:47:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A4=E6=96=AD=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- new/AAP-New.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/new/AAP-New.sh b/new/AAP-New.sh index 60f43ba..afe6395 100755 --- a/new/AAP-New.sh +++ b/new/AAP-New.sh @@ -17,10 +17,6 @@ log_err() { log_warn() { echo -e "${YELLOW}[WARN] $(date "+%H:%M:%S"): $1${RESET}" } -if [[ $(id -u) -ne 0 ]]; then - log_err "Run this script with root!" - exit 127 -fi print_help() { echo -e "${GREEN}" cat <<-EOF @@ -92,6 +88,11 @@ while getopts ":hvi:k:nVs:SE:" OPT; do esac done +# ROOT 检测 +if [[ $(id -u) -ne 0 ]]; then + log_err "Run this script with root!" + exit 127 +fi # OS 检测 if (command -v getprop >/dev/null 2>&1); then OS="android"