优化一下/bin 下级目录结构

This commit is contained in:
juewuy
2023-05-19 15:12:00 +08:00
parent 8d31f80ab9
commit cb304ebe79
3 changed files with 21 additions and 3253 deletions

View File

@@ -32,7 +32,7 @@ jobs:
- name: Update Dashboard - name: Update Dashboard
run: | run: |
cd \bin cd bin/dashboard
echo 下载官方面板 echo 下载官方面板
curl -kfSL -o clashdb.zip https://github.com/Dreamacro/clash-dashboard/archive/gh-pages.zip curl -kfSL -o clashdb.zip https://github.com/Dreamacro/clash-dashboard/archive/gh-pages.zip
echo 下载Meta面板 echo 下载Meta面板
@@ -44,11 +44,11 @@ jobs:
echo 解压缩 echo 解压缩
unzip -o clashdb.zip > /dev/null unzip -o clashdb.zip > /dev/null
unzip -o yacd.zip > /dev/null unzip -o yacd.zip > /dev/null
cd \clash-dashboard-gh-pages cd clash-dashboard-gh-pages
tar -zcvf clashdb.tar.gz * > /dev/null tar -zcvf clashdb.tar.gz * > /dev/null
mv -f clashdb.tar.gz ../ mv -f clashdb.tar.gz ../
cd .. cd ..
cd \yacd-gh-pages cd yacd-gh-pages
echo yacd特殊处理 echo yacd特殊处理
find -name '*.map' | xargs rm -rf find -name '*.map' | xargs rm -rf
rm -rf report.html rm -rf report.html
@@ -59,11 +59,11 @@ jobs:
echo 解压缩 echo 解压缩
unzip -o meta_db.zip > /dev/null unzip -o meta_db.zip > /dev/null
unzip -o meta_yacd.zip > /dev/null unzip -o meta_yacd.zip > /dev/null
cd \Razord-meta-gh-pages cd Razord-meta-gh-pages
tar -zcvf meta_db.tar.gz * > /dev/null tar -zcvf meta_db.tar.gz * > /dev/null
mv -f meta_db.tar.gz ../ mv -f meta_db.tar.gz ../
cd .. cd ..
cd \Yacd-meta-gh-pages cd Yacd-meta-gh-pages
echo yacd特殊处理 echo yacd特殊处理
find -name '*.map' | xargs rm -rf find -name '*.map' | xargs rm -rf
rm -rf report.html rm -rf report.html
@@ -75,25 +75,25 @@ jobs:
rm -rf yacd.zip rm -rf yacd.zip
rm -rf meta_db.zip rm -rf meta_db.zip
rm -rf meta_yacd.zip rm -rf meta_yacd.zip
rm -rf \clash-dashboard-gh-pages rm -rf clash-dashboard-gh-pages
rm -rf \yacd-gh-pages rm -rf yacd-gh-pages
rm -rf \Razord-meta-gh-pages rm -rf Razord-meta-gh-pages
rm -rf \Yacd-meta-gh-pages rm -rf Yacd-meta-gh-pages
echo 面板更新完成! echo 面板更新完成!
- name: Update GeoIP - name: Update GeoIP
run: | run: |
cd \bin cd bin
source version source version
curl -kfSL -O https://raw.githubusercontent.com/alecthw/mmdb_china_ip_list/release/Country.mmdb curl -kfSL -o geodata/Country.mmdb https://raw.githubusercontent.com/alecthw/mmdb_china_ip_list/release/Country.mmdb
curl -kfSL -o cn_mini.mmdb https://raw.githubusercontent.com/Hackl0us/GeoIP2-CN/release/Country.mmdb curl -kfSL -o geodata/cn_mini.mmdb https://raw.githubusercontent.com/Hackl0us/GeoIP2-CN/release/Country.mmdb
curl -kfSL -o china_ip_list.txt https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.txt curl -kfSL -o geodata/china_ip_list.txt https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.txt
curl -kfSL -o china_ipv6_list.txt https://raw.githubusercontent.com/ChanthMiao/China-IPv6-List/release/cn6.txt curl -kfSL -o geodata/china_ipv6_list.txt https://raw.githubusercontent.com/ChanthMiao/China-IPv6-List/release/cn6.txt
curl -kfSL -O https://raw.githubusercontent.com/P3TERX/ca-certificates.crt/download/ca-certificates.crt curl -kfSL -o geodata/geosite.dat https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geosite.dat
curl -kfSL -O https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geosite.dat curl -kfSL -o fix/ca-certificates.crt https://raw.githubusercontent.com/P3TERX/ca-certificates.crt/download/ca-certificates.crt
sed -i '/GeoIP_v*/'d version sed -i '/GeoIP_v*/'d version
echo GeoIP_v=`date '+%Y%m%d'` >> version echo GeoIP_v=`date '+%Y%m%d'` >> version
echo IP数据库及根证书文件更新完成! echo 数据库及根证书文件更新完成!
- name: Commit and push - name: Commit and push
run: | run: |

File diff suppressed because it is too large Load Diff

View File

@@ -719,7 +719,7 @@ setcore(){
getgeo(){ getgeo(){
echo ----------------------------------------------- echo -----------------------------------------------
echo 正在从服务器获取数据库文件………… echo 正在从服务器获取数据库文件…………
$clashdir/start.sh webget /tmp/$geoname $update_url/bin/$geotype $clashdir/start.sh webget /tmp/$geoname $update_url/bin/geodata/$geotype
if [ "$?" = "1" ];then if [ "$?" = "1" ];then
echo ----------------------------------------------- echo -----------------------------------------------
echo -e "\033[31m文件下载失败\033[0m" echo -e "\033[31m文件下载失败\033[0m"
@@ -800,7 +800,7 @@ getdb(){
rm -rf $bindir/ui rm -rf $bindir/ui
fi fi
fi fi
dblink="${update_url}/bin/${db_type}.tar.gz" dblink="${update_url}/bin/dashboard/${db_type}.tar.gz"
echo ----------------------------------------------- echo -----------------------------------------------
echo 正在连接服务器获取安装文件………… echo 正在连接服务器获取安装文件…………
$clashdir/start.sh webget /tmp/clashdb.tar.gz $dblink $clashdir/start.sh webget /tmp/clashdb.tar.gz $dblink