refactor: 调整代码顺序

This commit is contained in:
Olia Lisa
2026-07-23 14:02:32 +08:00
parent 0e93c1be0c
commit 2b5026d76c
+4 -4
View File
@@ -283,9 +283,6 @@ valid_ipv4() {
return 0 return 0
} }
# 项目根目录,用来保证从任意位置执行 main.sh 都能找到其他脚本
project_dir="$(cd "$(dirname "$0")" && pwd)"
cd "$project_dir"
# 要构建的 ImmortalWrt 版本, 可以在 https://github.com/immortalwrt/immortalwrt 查询版本号 # 要构建的 ImmortalWrt 版本, 可以在 https://github.com/immortalwrt/immortalwrt 查询版本号
default_version="25.12.1" default_version="25.12.1"
@@ -298,7 +295,10 @@ rootfs_partsize=$(ask_input "请输入根分区大小(MB)" "$default_rootfs_part
# lan口ip # lan口ip
default_lan_ip="192.168.1.1" default_lan_ip="192.168.1.1"
lan_ip=$(input_lan_ip "$default_lan_ip") lan_ip=$(input_lan_ip "$default_lan_ip")
echo $lan_ip
# 进入项目根目录,用来保证从任意位置执行 main.sh 都能找到其他脚本
project_dir="$(cd "$(dirname "$0")" && pwd)"
cd "$project_dir"
# 安装依赖 # 安装依赖
install_dependencies install_dependencies