Skip to content

Commit

Permalink
fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
AkinaLTS committed Sep 1, 2024
1 parent e2d371d commit 014f4d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion AAP.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ In addition, you can use \`APTOOLDEBUG=1 ${0} [ARGS]\` format to enter verbose m
}

# 参数解析
DOWNLOADKP=true
while getopts ":hvi:k:IVs:Sd:E:" OPT; do
case $OPT in
h | v)
print_help
;;
d)
WORKDIR="$(realpath ${OPTARG})"
DOWNLOADKP=true
if [ -d "${WORKDIR}" ]; then
msg_info "The work directory was manually specified: ${WORKDIR}. kptools and kpimg will not be downloaded again."
DOWNLOADKP=false
Expand Down
10 changes: 5 additions & 5 deletions test/AAP.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,22 @@ Current DIR: $(pwd)
When the -s parameter is not specified, uuid will be used to generate an 8-digit SuperKey that is a mixture of alphanumeric characters.
When the -d parameter is specified, the specified folder should contain magiskboot, kptools and kpimg, otherwise the run will fatal.
When the -d parameter is specified, the specified folder should contain magiskboot, kptools and kpimg, otherwise you will get a fatal error.
In addition, you can use \`APTOOLDEBUG=1 ${0} [ARGS]\` format to enter verbose mode.
"
exit 0
}

# 参数解析
DOWNLOADKP=true
while getopts ":hvi:k:IVs:Sd:E:" OPT; do
case $OPT in
h | v)
print_help
;;
d)
WORKDIR="$(realpath ${OPTARG})"
DOWNLOADKP=true
if [ -d "${WORKDIR}" ]; then
msg_info "The work directory was manually specified: ${WORKDIR}. kptools and kpimg will not be downloaded again."
DOWNLOADKP=false
Expand All @@ -101,8 +101,8 @@ while getopts ":hvi:k:IVs:Sd:E:" OPT; do
exit 1
fi
for i in magiskboot kptools-${OS} kpimg-android; do
if [ ! -f "${WORKDIR}/${i}" ]; then
msg_fatal "Missing file: ${1}"
if [ ! -e "${WORKDIR}/${i}" ]; then
msg_fatal "Missing file: ${WORKDIR}/${i}"
exit 127
fi
done
Expand Down Expand Up @@ -223,7 +223,7 @@ else
fi

# 加载操作文件
. ~/APatchTool/AAPFunction
. ~/APatchTool//AAPFunction

get_device_boot
get_tools
Expand Down

0 comments on commit 014f4d9

Please sign in to comment.