From 2b5026d76ccba9221a9237a6d46691167030d6d4 Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Thu, 23 Jul 2026 14:02:32 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=B0=83=E6=95=B4=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- x86-64.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x86-64.sh b/x86-64.sh index 5fee7b6..1e3adda 100644 --- a/x86-64.sh +++ b/x86-64.sh @@ -283,9 +283,6 @@ valid_ipv4() { return 0 } -# 项目根目录,用来保证从任意位置执行 main.sh 都能找到其他脚本 -project_dir="$(cd "$(dirname "$0")" && pwd)" -cd "$project_dir" # 要构建的 ImmortalWrt 版本, 可以在 https://github.com/immortalwrt/immortalwrt 查询版本号 default_version="25.12.1" @@ -298,7 +295,10 @@ rootfs_partsize=$(ask_input "请输入根分区大小(MB)" "$default_rootfs_part # lan口ip default_lan_ip="192.168.1.1" lan_ip=$(input_lan_ip "$default_lan_ip") -echo $lan_ip + +# 进入项目根目录,用来保证从任意位置执行 main.sh 都能找到其他脚本 +project_dir="$(cd "$(dirname "$0")" && pwd)" +cd "$project_dir" # 安装依赖 install_dependencies