From b55020a18bada84149607ae7597371a5769235fe Mon Sep 17 00:00:00 2001 From: xishang0128 Date: Mon, 18 Mar 2024 23:53:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=B7=B7=E5=90=88=E8=A7=84?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/run.yml | 22 +++++++++++----------- resouces/convert.sh | 20 ++++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 12682dbc..ec3f9cb7 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -265,17 +265,17 @@ jobs: chmod 755 mosdns convert-clash.sh && ./convert-clash.sh rm mosdns* convert-clash.sh geoip.dat geosite.dat LICENSE README.md config.yaml - - name: Convert bm7-rule-set to sing-rule-set - env: - NO_SKIP: true - run: | - mkdir -p ./sing-rule/bm7 - cp ./resouces/bm7.sh ./sing-rule/bm7/ - cd ./sing-rule/bm7 - wget https://github.com/SagerNet/sing-box/releases/download/v1.8.0-alpha.1/sing-box-1.8.0-alpha.1-linux-amd64.tar.gz -O sing-box.tar.gz && tar zxvf sing-box.tar.gz && mv sing-box-1.8.0-alpha.1-linux-amd64/sing-box ./ && rm -r sing-box-1.8.0-alpha.1-linux-amd64 - ls - chmod 755 bm7.sh && ./bm7.sh - rm -r bm7.sh sing-box* rule + # - name: Convert bm7-rule-set to sing-rule-set + # env: + # NO_SKIP: true + # run: | + # mkdir -p ./sing-rule/bm7 + # cp ./resouces/bm7.sh ./sing-rule/bm7/ + # cd ./sing-rule/bm7 + # wget https://github.com/SagerNet/sing-box/releases/download/v1.8.0-alpha.1/sing-box-1.8.0-alpha.1-linux-amd64.tar.gz -O sing-box.tar.gz && tar zxvf sing-box.tar.gz && mv sing-box-1.8.0-alpha.1-linux-amd64/sing-box ./ && rm -r sing-box-1.8.0-alpha.1-linux-amd64 + # ls + # chmod 755 bm7.sh && ./bm7.sh + # rm -r bm7.sh sing-box* rule - name: Move and zip files run: | diff --git a/resouces/convert.sh b/resouces/convert.sh index a0d52faa..2fadc75b 100644 --- a/resouces/convert.sh +++ b/resouces/convert.sh @@ -19,13 +19,13 @@ for ((i = 0; i < ${#list[@]}; i++)); do ./sing-box rule-set compile ./geosite/${list[i]}.json -o ./geosite/${list[i]}.srs done -mkdir -p mixed -for file in $(find geoip -type f | grep -v srs | awk -F "/" '{print $NF}'); do - if [ -n "$(find geosite -type f -iname "$file")" ]; then - file=$(find ./geosite -type f -iname "$file" | awk -F"/" '{print $NF}' | sed 's/\.json//g') - head -n -3 ./geoip/${file}.json >./mixed/${file}.json - sed -i 's/]/],/g' ./mixed/${file}.json - tail -n +5 ./geosite/${file}.json >>./mixed/${file}.json - ./sing-box rule-set compile ./mixed/${file}.json -o ./mixed/${file}.srs - fi -done +# mkdir -p mixed +# for file in $(find geoip -type f | grep -v srs | awk -F "/" '{print $NF}'); do +# if [ -n "$(find geosite -type f -iname "$file")" ]; then +# file=$(find ./geosite -type f -iname "$file" | awk -F"/" '{print $NF}' | sed 's/\.json//g') +# head -n -3 ./geoip/${file}.json >./mixed/${file}.json +# sed -i 's/]/],/g' ./mixed/${file}.json +# tail -n +5 ./geosite/${file}.json >>./mixed/${file}.json +# ./sing-box rule-set compile ./mixed/${file}.json -o ./mixed/${file}.srs +# fi +# done