Skip to content

Commit

Permalink
dont want to write this
Browse files Browse the repository at this point in the history
  • Loading branch information
AkinaAcct committed Jun 6, 2024
1 parent 15fc4b0 commit 12b84ad
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions AAP.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#by Akina | LuoYan
#2024-06-03 Rewrite

Expand All @@ -11,13 +11,13 @@ RANDOMNUM="$(date "+%N")" # RANDOM NUMBER

# 格式化打印消息
msg_info() { # 打印消息 格式: "[INFO] TIME: MSG"(BLUE)
printf "${BLUE} %s\n ${RESET}" "[INFO]$(date "+%H:%M:%S"): $1"
printf "${BLUE}%s\n${RESET}" "[INFO]$(date "+%H:%M:%S"): $1"
}
msg_warn() { # 打印消息 格式: "[WARN] TIME: MSG"(YELLOW)
printf "${YELLOW} %s\n ${RESET}" "[WARN]$(date "+%H:%M:%S"): $1"
printf "${YELLOW}%s\n${RESET}" "[WARN]$(date "+%H:%M:%S"): $1"
}
msg_err() { # 打印消息 格式: "[ERROR] TIME: MSG"(RED)
printf "${RED} %s\n ${RESET}" "[ERROR]$(date "+%H:%M:%S"): $1"
printf "${RED}%s\n${RESET}" "[ERROR]$(date "+%H:%M:%S"): $1"
}
if (command -v getprop >/dev/null 2>&1); then
OS="android"
Expand All @@ -26,6 +26,10 @@ else
OS="linux"
msg_warn "You are using ${OS}. Using this script on ${OS} is still under testing."
fi
if [[ -z "${TERMUX_VERSION}" && "${OS}" == "android" ]]; then
msg_err "Unsupported terminal app! Only support Termux!"
exit 1
fi

print_help() {
echo -e "${GREEN}"
Expand Down

0 comments on commit 12b84ad

Please sign in to comment.