fix: 1、env.sh增加-p选项用于传递系统密码;2、自动输入log增加以Page结尾的class名称;

Description:

Log:
This commit is contained in:
mikigo 2024-03-26 18:40:43 +08:00
parent 9cce1baf63
commit 217d95af15
2 changed files with 17 additions and 3 deletions

View File

@ -3,10 +3,22 @@
# SPDX-License-Identifier: GPL-2.0-only
tag=$(echo "$(cat ./CURRENT | grep "tag = ")" | cut -d "=" -f2 | python3 -c "s=input();print(s.strip())")
ROOT_DIR=`pwd`
config_pwd=$(cat ./setting/globalconfig.ini | grep "PASSWORD = ")
PASSWORD=$(echo "${config_pwd}" | cut -d "=" -f2 | python3 -c "s=input();print(s.strip())")
while getopts ":p:" opt
do
case $opt in
p)
PASSWORD=$OPTARG
;;
?)
echo "there is unrecognized parameter."
exit 1
;;
esac
done
DISPLAY_SERVER=$(cat ~/.xsession-errors | grep XDG_SESSION_TYPE | head -n 1 | cut -d "=" -f2)
PYTHON_VERSION=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
flag_feel="\n**** (・_・) ****\n"
@ -20,6 +32,8 @@ check_status(){
echo -e "$1\t安装成功 √"
else
echo -e "$1\t安装失败 ×"
echo "PASSWORD: ${PASSWORD}"
echo "如果密码与实际不符,请使用 -p 选项传入参数bash env.sh -p xxx或修改setting/globalconfig.ini中的PASSWORD配置项"
cat /tmp/env.log
fi
}

View File

@ -252,7 +252,7 @@ LOG_LEVEL = DEBUG
CLASS_NAME_STARTSWITH = Assert
;支持类名以 xxx 结尾的,自动将函数说明打印为日志,多个参数以逗号隔开
CLASS_NAME_ENDSWITH = Widget
CLASS_NAME_ENDSWITH = Widget,Page
;支持类名包含 xxx 的,自动将函数说明打印为日志,多个参数以逗号隔开
CLASS_NAME_CONTAIN = ShortCut