Skip to content

Commit

Permalink
修改判断逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
AkinaAcct committed Jun 4, 2024
1 parent 8d282a4 commit 11f2d60
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions new/AAP-New.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 11f2d60

Please sign in to comment.