Update bm7.sh

This commit is contained in:
汐殇 2024-01-13 17:48:17 +08:00 committed by GitHub
parent 8e5b64e579
commit 582b71021c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,12 @@ if [ ! -d rule ]; then
rm -rf .git rm -rf .git
fi fi
# 移动文件/目录到同一文件夹 # 移动文件/目录到同一文件夹
list=($(find ./rule/Clash/ | awk -F '/' '{print $5}' | sed '/^$/d' | grep -v '\.' | sort -u))
for ((i = 0; i < ${#list[@]}; i++)); do
path=$(find ./rule/Clash/ -name ${list[i]})
mv $path ./rule/Clash/
done
list=($(ls ./rule/Clash/)) list=($(ls ./rule/Clash/))
for ((i = 0; i < ${#list[@]}; i++)); do for ((i = 0; i < ${#list[@]}; i++)); do
if [ -z "$(ls ./rule/Clash/${list[i]} | grep '.yaml')" ]; then if [ -z "$(ls ./rule/Clash/${list[i]} | grep '.yaml')" ]; then