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