Compare commits

..

No commits in common. "bc238584bfee1be494820620f714a294151fa477" and "14d75c3d5f6096f6bb031541346b0ac5470ffe2c" have entirely different histories.

2 changed files with 0 additions and 37 deletions

View File

@ -58,13 +58,6 @@ jobs:
path: Iran-sing-box-rules
ref: rule-set
- name: Checkout hiddify-geo
uses: actions/checkout@v4
with:
repository: hiddify/hiddify-geo
path: hiddify-geo
ref: rule-set
- name: IR copy geo rules
env:
NO_SKIP: true

View File

@ -20,9 +20,6 @@ work_dir=$(realpath "$target_dir")
target_dir="${work_dir}/chinese"
sing_exe="${work_dir}/sing-box"
LOG_FILE="merge.log"
# cat /dev/null > $LOG_FILE
# ———————————————————————————————————————————————————————————————————————————————————————————————
@ -72,32 +69,6 @@ function download_adblockfilters() {
}
function merge_hiddify_geo(){
src_dir=$(dirname $work_dir)/hiddify-geo/country
LOG_FILE="${work_dir}/geo/${LOG_FILE}"
echo "merge dir >> ${src_dir}"
# 遍历country目录下所有以geoip或geosite开头的.srs文件
for file1 in $(ls $src_dir/geo*-*.srs); do
filename1=${file1##*/}
# 修正2移除多余的$$符号
caty=${filename1%%-*} # 截取第一个"-"前的部分
country=${filename1#*-} # 截取第一个"-"后的部分
# echo "类型: $caty, 国家代码: $country"
# Check if file exists in folder b with the same name
file2="$work_dir/geo/$caty/$country"
# If file not found, print filename
if [ ! -f $file2 ]; then
cp $file1 $file2
echo "hiddify-geo/country/${filename1}" >> $LOG_FILE
fi
done
}
# ———————————————————————————————————————————————————————————————————————————————————————————————
chmod +x $sing_exe
@ -106,7 +77,6 @@ mkdir $target_dir ; cd $target_dir
echo "start<= ${target_dir}"
download_adblockfilters
merge_hiddify_geo
echo "end<= ${target_dir}"
#END FILE