refactor: 抽取插件包变量PACKAGES
This commit is contained in:
@@ -73,42 +73,10 @@ build(){
|
||||
# ────────────────────────────────────────────
|
||||
LAN_IP=${3}
|
||||
|
||||
# =============================================================
|
||||
# ────────────────────────────────────────────
|
||||
# 插件包列表
|
||||
# - 前面加 - 表示从固件中移除该包,例如 -dnsmasq
|
||||
# - 每行一个,方便增删注释
|
||||
# =============================================================
|
||||
PKG_LIST=(
|
||||
vim-full
|
||||
nano-plus
|
||||
bash
|
||||
curl
|
||||
shadow-chsh
|
||||
openssh-sftp-server
|
||||
luci-i18n-argon-config-zh-cn
|
||||
luci-i18n-package-manager-zh-cn
|
||||
luci-i18n-firewall-zh-cn
|
||||
luci-i18n-arpbind-zh-cn
|
||||
|
||||
# 现代终端工具
|
||||
ripgrep
|
||||
diffutils
|
||||
less
|
||||
|
||||
# 分区扩容
|
||||
luci-i18n-diskman-zh-cn
|
||||
cfdisk
|
||||
resize2fs
|
||||
e2fsprogs
|
||||
losetup
|
||||
|
||||
# 代理插件
|
||||
luci-i18n-daed-zh-cn
|
||||
luci-i18n-homeproxy-zh-cn
|
||||
sing-box
|
||||
)
|
||||
|
||||
PACKAGES=$(printf "%s " "${PKG_LIST[@]}")
|
||||
# ────────────────────────────────────────────
|
||||
PACKAGES="${4}"
|
||||
|
||||
GREEN="\033[0;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
@@ -213,8 +181,44 @@ cd "$project_dir"
|
||||
default_lan_ip="192.168.1.1"
|
||||
lan_ip=$(input_lan_ip "$default_lan_ip")
|
||||
|
||||
# =============================================================
|
||||
# 插件包列表
|
||||
# - 前面加 - 表示从固件中移除该包,例如 -dnsmasq
|
||||
# - 每行一个,方便增删注释
|
||||
# =============================================================
|
||||
pkg_list=(
|
||||
vim-full
|
||||
nano-plus
|
||||
bash
|
||||
curl
|
||||
shadow-chsh
|
||||
openssh-sftp-server
|
||||
luci-i18n-argon-config-zh-cn
|
||||
luci-i18n-package-manager-zh-cn
|
||||
luci-i18n-firewall-zh-cn
|
||||
luci-i18n-arpbind-zh-cn
|
||||
|
||||
# 现代终端工具
|
||||
ripgrep
|
||||
diffutils
|
||||
less
|
||||
|
||||
# 分区扩容
|
||||
luci-i18n-diskman-zh-cn
|
||||
cfdisk
|
||||
resize2fs
|
||||
e2fsprogs
|
||||
losetup
|
||||
|
||||
# 代理插件
|
||||
luci-i18n-daed-zh-cn
|
||||
luci-i18n-homeproxy-zh-cn
|
||||
sing-box
|
||||
)
|
||||
packages=$(printf "%s " "${pkg_list[@]}") # 动态拼接成字符串
|
||||
|
||||
install_dependencies
|
||||
|
||||
builder_dir="$(download_imagebuilder "$version")"
|
||||
|
||||
build $builder_dir $rootfs_partsize $lan_ip
|
||||
build "$builder_dir" "$rootfs_partsize" "$lan_ip" "$packages"
|
||||
Reference in New Issue
Block a user