refactor: 调整代码顺序
This commit is contained in:
+3
-3
@@ -154,9 +154,6 @@ build() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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"
|
||||||
version=$(ask_input "请输入 ImmortalWrt 版本" "$default_version")
|
version=$(ask_input "请输入 ImmortalWrt 版本" "$default_version")
|
||||||
@@ -165,6 +162,9 @@ version=$(ask_input "请输入 ImmortalWrt 版本" "$default_version")
|
|||||||
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")
|
||||||
|
|
||||||
|
project_dir="$(cd "$(dirname "$0")" && pwd)"
|
||||||
|
cd "$project_dir"
|
||||||
|
|
||||||
install_dependencies
|
install_dependencies
|
||||||
|
|
||||||
builder_dir="$(download_imagebuilder "$version")"
|
builder_dir="$(download_imagebuilder "$version")"
|
||||||
|
|||||||
+3
-5
@@ -155,11 +155,6 @@ build() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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"
|
||||||
version=$(ask_input "请输入 ImmortalWrt 版本" "$default_version")
|
version=$(ask_input "请输入 ImmortalWrt 版本" "$default_version")
|
||||||
@@ -168,6 +163,9 @@ version=$(ask_input "请输入 ImmortalWrt 版本" "$default_version")
|
|||||||
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")
|
||||||
|
|
||||||
|
project_dir="$(cd "$(dirname "$0")" && pwd)"
|
||||||
|
cd "$project_dir"
|
||||||
|
|
||||||
# 安装依赖
|
# 安装依赖
|
||||||
install_dependencies
|
install_dependencies
|
||||||
|
|
||||||
|
|||||||
@@ -199,11 +199,6 @@ build(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# 项目根目录,保证从任意位置执行 r2s.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"
|
||||||
version=$(ask_input "请输入 ImmortalWrt 版本" "$default_version")
|
version=$(ask_input "请输入 ImmortalWrt 版本" "$default_version")
|
||||||
@@ -212,6 +207,10 @@ version=$(ask_input "请输入 ImmortalWrt 版本" "$default_version")
|
|||||||
default_rootfs_partsize="600"
|
default_rootfs_partsize="600"
|
||||||
rootfs_partsize=$(ask_input "请输入根分区大小(MB)" "$default_rootfs_partsize")
|
rootfs_partsize=$(ask_input "请输入根分区大小(MB)" "$default_rootfs_partsize")
|
||||||
|
|
||||||
|
# 项目根目录,保证从任意位置执行 r2s.sh 都能找到其他资源
|
||||||
|
project_dir="$(cd "$(dirname "$0")" && pwd)"
|
||||||
|
cd "$project_dir"
|
||||||
|
|
||||||
# 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")
|
||||||
|
|||||||
Reference in New Issue
Block a user