Skip to content

Commit

Permalink
fix argon-config
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed Sep 17, 2023
1 parent 760317f commit 2218e51
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 52 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/upgrade.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Copyright (C) 2022 Ing <https://github.com/wjz304>
#
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
Expand All @@ -17,7 +17,7 @@ jobs:
update:
strategy:
matrix:
branch: [ openwrt, lede ]
branch: [openwrt, lede]

runs-on: ubuntu-latest
steps:
Expand All @@ -28,11 +28,11 @@ jobs:
fetch-depth: 0

- name: Initialization environment
run : |
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
sudo timedatectl set-timezone "Asia/Shanghai"
- name: Repo packages
run: |
cd $GITHUB_WORKSPACE
Expand All @@ -41,7 +41,7 @@ jobs:
else
curl -skL https://raw.githubusercontent.com/wjz304/openwrt-packages/main/upgrade.sh | bash -s ${{ matrix.branch }}
fi
- name: Check for changes
run: |
if [ -n "$(git status -s | grep -v -w timestamp)" ];then
Expand Down
81 changes: 34 additions & 47 deletions upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,48 +12,67 @@
# Description: OpenWrt packages update script
#====================================================================


BRANCH=${1:-openwrt}

function _lang() {
if [ "${BRANCH}" == "openwrt" ]; then
for I in $(find $1 -name "zh-cn"); do
[ ! -d "${I}" ] && continue
[ -d "${I/zh-cn/zh_Hans}" ] && continue
cp -rf "${I}" "${I/zh-cn/zh_Hans}"
done
for I in $(find $1 -name "zh-tw"); do
[ ! -d "${I}" ] && continue
[ -d "${I/zh-tw/zh_Hant}" ] && continue
cp -rf "${I}" "${I/zh-tw/zh_Hant}"
done
else
for I in $(find $1 -name "zh_Hans"); do
[ ! -d "${I}" ] && continue
[ -d "${I/zh_Hans/zh-cn}" ] && continue
cp -rf "${I}" "${I/zh_Hans/zh-cn}"
done
for I in $(find $1 -name "zh_Hant"); do
[ ! -d "${I}" ] && continue
[ -d "${I/zh_Hant/zh-tw}" ] && continue
cp -rf "${I}" "${I/zh_Hant/zh-tw}"
done
fi
}

function git_clone() {
rm -rf $(basename $1 .git)
branch=""
[ ! -z "$2" ] && branch="-b $2"
git clone --depth 1 ${branch} $1 $(basename $1 .git) || true
# sed -i 's/..\/..\/luci.mk/$(TOPDIR)\/feeds\/luci\/luci.mk/g' $(basename $1 .git)/Makefile
rm -rf $(basename $1 .git)/.svn* $(basename $1 .git)/.git*
_lang $(basename $1 .git)
}

function svn_co() {
rm -rf $(basename $1 .git)
svn co $1 $(basename $1 .git) || true
# sed -i 's/..\/..\/luci.mk/$(TOPDIR)\/feeds\/luci\/luci.mk/g' $(basename $1 .git)/Makefile
rm -rf $(basename $1 .git)/.svn* $(basename $1 .git)/.git*
_lang $(basename $1 .git)
}



# default-settings
[ "${BRANCH}" == "openwrt" ] && svn_co https://github.com/wjz304/openwrt-packages/trunk/default-settings


# r8125
svn_co https://github.com/wjz304/openwrt-packages/trunk/r8125


# Argon 主题
git_clone https://github.com/jerrykuku/luci-theme-argon `[ "${BRANCH}" == "lede" ] && echo "18.06"`


# Pink 主题
git_clone https://github.com/virualv/luci-theme-pink

# Argon 主题
git_clone https://github.com/jerrykuku/luci-theme-argon $([ "${BRANCH}" == "lede" ] && echo "18.06")

# Argon 主题配置插件
git_clone https://github.com/jerrykuku/luci-app-argon-config
git_clone https://github.com/jerrykuku/luci-app-argon-config $([ "${BRANCH}" == "lede" ] && echo "18.06")
sed -i 's/\(+luci-compat\)/\1 +luci-theme-argon/' luci-app-argon-config/Makefile
sed -i 's/\"Argon 主题设置\"/\"主题设置\"/g' luci-app-argon-config/po/zh-cn/argon-config.po


# 在线用户
git_clone https://github.com/selfcan/luci-app-onliner
Expand All @@ -62,11 +81,9 @@ chmod 755 luci-app-onliner/root/usr/share/onliner/setnlbw.sh
# 关机
git_clone https://github.com/esirplayground/luci-app-poweroff


# 自动格式化分区、扩容、自动挂载
git_clone https://github.com/sirpdboy/luci-app-partexp


# bypass
#git_clone https://github.com/kiddin9/openwrt-bypass
svn_co https://github.com/kiddin9/openwrt-packages/trunk/luci-app-bypass
Expand All @@ -81,51 +98,42 @@ svn_co https://github.com/xiaorouji/openwrt-passwall/branches/luci/luci-app-pass
# Passwall2 # 依赖 openwrt-passwall
svn_co https://github.com/xiaorouji/openwrt-passwall2/trunk/luci-app-passwall2


# HelloWorld 依赖
git_clone https://github.com/fw876/helloworld


# HelloWorld # 依赖 helloworld 和 openwrt-passwall
git_clone https://github.com/jerrykuku/lua-maxminddb
git_clone https://github.com/jerrykuku/luci-app-vssr


# OpenClash
git_clone https://github.com/vernesong/OpenClash
rm -rf luci-app-openclash && mv -f OpenClash/luci-app-openclash . && rm -rf OpenClash


# Clash
git_clone https://github.com/frainzy1477/luci-app-clash


# iKoolProxy 滤广告
git_clone https://github.com/yaof2/luci-app-ikoolproxy


# AdGuard Home
git_clone https://github.com/rufengsuixing/luci-app-adguardhome


# SmartDNS # 与 bypass 冲突
#git_clone https://github.com/pymumu/openwrt-smartdns
#git_clone https://github.com/pymumu/openwrt-smartdns
#git_clone https://github.com/pymumu/luci-app-smartdns lede
#sed -i 's/..\/..\/luci.mk/$(TOPDIR)\/feeds\/luci\/luci.mk/g' luci-app-smartdns/Makefile


# 应用商店
git_clone https://github.com/linkease/istore-ui
git_clone https://github.com/linkease/istore && mv -n istore/luci/* ./; rm -rf istore
git_clone https://github.com/linkease/istore && mv -n istore/luci/* ./
rm -rf istore
sed -i 's/luci-lib-ipkg/luci-base/g' luci-app-store/Makefile


# 网络向导
svn_co https://github.com/linkease/nas-packages/trunk/network/services/quickstart
svn_co https://github.com/linkease/nas-packages-luci/trunk/luci/luci-app-quickstart
sed -i 's/ +luci-app-store//g' luci-app-quickstart/Makefile


# lucky
# git_clone https://github.com/sirpdboy/luci-app-lucky
# 和DDNS-GO只能选择其中的一个就可以了,已经涵盖ddns-go了
Expand All @@ -141,65 +149,50 @@ git_clone https://github.com/sirpdboy/luci-app-ddns-go
# 系统路径 etc/init.d/ddnsgo
# >> 300秒为本地校验时长,5分钟检测一次共计5次=25分钟左右会和域名商比对


# 实时监控
git_clone https://github.com/sirpdboy/luci-app-netdata


# 高级设置
git_clone https://github.com/sirpdboy/luci-app-advanced


# 定时任务
git_clone https://github.com/DevOpenWRT-Router/luci-app-rebootschedule
sed -i '/firstchild/d' luci-app-rebootschedule/luasrc/controller/rebootschedule.lua
sed -i 's/"control"/"system"/g; s/"Timing setting"/"定时任务"/g' luci-app-rebootschedule/luasrc/controller/rebootschedule.lua
chmod 755 luci-app-rebootschedule/root/etc/init.d/rebootschedule


# 应用过滤
git_clone https://github.com/destan19/OpenAppFilter


# 网速测试
git_clone https://github.com/sirpdboy/netspeedtest
# sed -i 's/DEPENDS:=\$(GO_ARCH_DEPENDS)$/DEPENDS:=\$(GO_ARCH_DEPENDS) +upx/g' netspeedtest/speedtest-web/Makefile

# 全能推送
git_clone https://github.com/zzsj0928/luci-app-pushbot


# ZeroTier
git_clone https://github.com/rufengsuixing/luci-app-zerotier
sed -i 's/"vpn"/"services"/g; s/"VPN"/"Services"/g' luci-app-zerotier/luasrc/controller/zerotier.lua


# Tailscale
git_clone https://github.com/MoZhonghua/openwrt-tailscale


# IPv6 端口转发
git_clone https://github.com/big-tooth/luci-app-socatg
#sed -i 's/socat\r/socatg\r/g' luci-app-socatg/Makefile && sed -i 's/socat$/socatg/g' luci-app-socatg/Makefile


# beardropper
git_clone https://github.com/NateLol/luci-app-beardropper


# IP限速
svn_co https://github.com/immortalwrt/luci/trunk/applications/luci-app-eqos
sed -i 's/..\/..\/luci.mk/$(TOPDIR)\/feeds\/luci\/luci.mk/g' luci-app-eqos/Makefile
cp -rf luci-app-eqos/po/zh_Hans luci-app-eqos/po/zh-cn
sed -i 's/zh_Hans/zh_CN/g' luci-app-eqos/po/zh-cn/eqos.po
chmod 755 luci-app-eqos/root/etc/init.d/eqos


# 文件浏览器
git_clone https://github.com/xiaozhuai/luci-app-filebrowser
sed -i 's/"services"/"nas"/g; s/"Services"/"NAS"/g' luci-app-filebrowser/luasrc/controller/filebrowser.lua
cp -rf luci-app-filebrowser/po/zh_Hans luci-app-filebrowser/po/zh-cn


# gowebdav
svn_co https://github.com/immortalwrt/packages/trunk/net/gowebdav
Expand All @@ -208,19 +201,13 @@ svn_co https://github.com/immortalwrt/luci/trunk/applications/luci-app-gowebdav
sed -i 's/..\/..\/luci.mk/$(TOPDIR)\/feeds\/luci\/luci.mk/g' luci-app-gowebdav/Makefile
#sed -i '/"NAS"/d; /page/d' luci-app-gowebdav/luasrc/controller/gowebdav.lua
#sed -i 's/\"nas\"/\"services\"/g' luci-app-gowebdav/luasrc/controller/gowebdav.lua
cp -rf luci-app-gowebdav/po/zh_Hans luci-app-gowebdav/po/zh-cn


# vm-tools
# git_clone https://github.com/fangli/openwrt-vm-tools




# clean
rm -rf ./*/.svn*
rm -rf ./*/.git*


#end
exit 0

0 comments on commit 2218e51

Please sign in to comment.