-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdiy-part2.sh
More file actions
executable file
·72 lines (59 loc) · 3.13 KB
/
Copy pathdiy-part2.sh
File metadata and controls
executable file
·72 lines (59 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
#
# Copyright (c) 2019-2020 P3TERX <https://p3terx.com>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
# https://github.com/P3TERX/Actions-OpenWrt
# File name: diy-part2.sh
# Description: OpenWrt DIY script part 2 (After Update feeds)
#
# Modify default IP
#sed -i 's/192.168.1.1/192.168.50.5/g' package/base-files/files/bin/config_generate
#rm -rf package/lean/luci-theme-argon
#git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git package/lean/luci-theme-argon
#git clone --depth=1 https://github.com/rufengsuixing/luci-app-adguardhome.git package/luci-app-adguardhome
#git clone -b lede https://github.com/pymumu/luci-app-smartdns.git package/lean/luci-app-smartdns
#git clone --depth=1 https://github.com/sirpdboy/luci-app-advanced.git package/luci-app-advanced
#git clone https://github.com/jerrykuku/luci-app-jd-dailybonus.git package/luci-app-jd-dailybonus
#chmod -R 755 files
#sed -i 's/luci-theme-bootstrap/luci-theme-argon/g' ./feeds/luci/collections/luci/Makefile
#golang19
#rm -rf feeds/packages/lang/golang
# svn export https://github.com/sbwml/packages_lang_golang feeds/packages/lang/golang
#git clone --depth=1 https://github.com/sbwml/packages_lang_golang feeds/packages/lang/golang
#rm -rf feeds/packages/lang/golang
#git clone https://github.com/sbwml/packages_lang_golang -b 23.x feeds/packages/lang/golang
#rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd*,miniupnpd-iptables,wireless-regdb}
rm -rf feeds/kenzo/luci-theme-alpha
# 删除 coolsnowwolf/luci feed 中的旧版 passwall(25.8.x),这才是版本不对的真正原因
rm -rf feeds/luci/applications/luci-app-passwall
rm -rf feeds/luci/applications/luci-app-passwall2
#删除源中npc net/nps/Makefile
#rm -rf feeds/packages/net/nps
# 同时删除 kenzok8/small 中的 passwall,避免冲突
./scripts/feeds install -p passwall_luci luci-app-passwall
./scripts/feeds install -p passwall_luci luci-app-passwall2
# 修复 luci-app-netdata 菜单消失问题
echo "Fixing luci-app-netdata..."
sed -i '/pidof netdata/,+2d' feeds/luci/applications/luci-app-netdata/luasrc/controller/netdata.lua
# #vlmcsd
sed -i 's/^CONFIG_PACKAGE_vlmcsd=.*/# CONFIG_PACKAGE_vlmcsd is not set/' .config || echo "# CONFIG_PACKAGE_vlmcsd is not set" >> .config
sed -i 's/^CONFIG_PACKAGE_luci-app-vlmcsd=.*/# CONFIG_PACKAGE_luci-app-vlmcsd is not set/' .config || echo "# CONFIG_PACKAGE_luci-app-vlmcsd is not set" >> .config
rm -rf feeds/packages/net/vlmcsd
rm -rf feeds/luci/applications/luci-app-vlmcsd
# # 如果你想排查被拉入的依赖,可以打印一下
# grep vlmcsd .config || echo "vlmcsd 已禁用"
# diy-part2.sh - 自动处理 zh-tw → zh-cn 国际化文件
# diy-part2.sh - 处理 iStore.zh-tw → iStore.zh-cn
I18N_DIRS=("feeds/luci/applications/iStore/i18n" "/usr/lib/lua/luci/i18n")
for dir in "${I18N_DIRS[@]}"; do
[ -d "$dir" ] || continue
for file in "$dir"/*.zh-tw.lmo; do
[ -e "$file" ] || continue
target="${file%.zh-tw.lmo}.zh-cn.lmo"
cp -f "$file" "$target"
echo "✅ 已生成: $(basename "$target")"
done
done