This commit is contained in:
Olia Lisa 2025-11-26 16:47:37 +08:00
parent a03b0f397a
commit 990f42843e

View File

@ -37,6 +37,26 @@ check_dependencies() {
check_docker_compose || exit_with_dep_error check_docker_compose || exit_with_dep_error
} }
# 安装依赖
install_dependencies() {
source ./bin/utils/bash.sh
if ! command -v jq >/dev/null 2>&1; then
echo "jq 未安装,开始安装..."
install_jq
fi
if ! command -v docker >/dev/null 2>&1; then
echo "Docker 未安装,开始安装..."
install_docker
fi
if ! command -v docker-compose >/dev/null 2>&1; then
echo "docker-compose 未安装,开始安装..."
install_docker_compose
fi
}
change_reality_dest(){ change_reality_dest(){
local config_dir="./conf" local config_dir="./conf"
@ -75,10 +95,7 @@ main(){
case $choice in case $choice in
0) 0)
# 安装依赖 # 安装依赖
source ./bin/utils/bash.sh install_dependencies
install_jq
install_docker
install_docker_compose
;; ;;
1) 1)
# 创建配置 / 重置配置 # 创建配置 / 重置配置