This commit is contained in:
Kiolow 2024-11-21 10:20:35 +08:00
parent a0be76b3bf
commit 863592de8d

View File

@ -7,11 +7,11 @@ then
exit 1
fi
# 获取脚本所在目录的上级目录路径
# 获取脚本bin目录路径
script_dir=$(cd "$(dirname "$0")"; pwd)
# 读取 config.json 文件
config=$(cat "$script_dir/../config.json")
# 读取配置文件内容
config=$(cat "${script_dir}/../config.json")
# 提取所需信息
password=$(echo "$config" | jq -r '.auth.password')