From a46c507968771e5eee37ef6d63299872b87a3cf9 Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Wed, 14 Jan 2026 22:45:40 +0800 Subject: [PATCH] update --- bin/update_port.sh | 2 -- install.sh | 9 +++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/bin/update_port.sh b/bin/update_port.sh index a583c32..bd2279c 100644 --- a/bin/update_port.sh +++ b/bin/update_port.sh @@ -77,8 +77,6 @@ change_port(){ local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" local config_dir=$(readlink -f "$script_dir/../config") local config_file="$config_dir/config.json" - - source "$script_dir/utils/jq_util.sh" local port=$(find_free_port) modify_json_file "$config_file" ".listen" ":$port" diff --git a/install.sh b/install.sh index 0790253..2937497 100644 --- a/install.sh +++ b/install.sh @@ -1,9 +1,9 @@ #!/bin/bash +source ./bin/utils/base.sh +source ./bin/utils/jq_util.sh + install(){ - local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/bin" # 脚本所在目录 - source "${script_dir}/utils/base.sh" - if ! command -v curl >/dev/null 2>&1; then install_package curl fi @@ -29,9 +29,6 @@ install(){ } main(){ - local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/bin" # 脚本所在目录 - source "${script_dir}/utils/base.sh" - # 显示菜单 echo "请选择一个操作:" echo "1. 一键部署"