This commit is contained in:
juewuy
2026-01-08 10:10:58 +08:00
parent 6d1b2a0a26
commit 8ef30efa31
7 changed files with 33 additions and 22 deletions

View File

@@ -372,16 +372,16 @@ EOF
}
}
if [ -z "$(grep "provider_temp_${coretype}" "$CRASHDIR"/configs/ShellCrash.cfg)" ];then
provider_temp_file=$(sed -n "1 p" "$CRASHDIR"/configs/${coretype}_providers.list | awk '{print $2}')
provider_temp_file="$TMPDIR/$(sed -n "1 p" "$CRASHDIR"/configs/${coretype}_providers.list | awk '{print $2}')"
else
provider_temp_file=$(grep "provider_temp_${coretype}" "$CRASHDIR"/configs/ShellCrash.cfg | awk -F '=' '{print $2}')
fi
echo "-----------------------------------------------"
if [ -s ${provider_temp_file} ];then
ln -sf ${provider_temp_file} "$TMPDIR"/provider_temp_file
if [ -s "$provider_temp_file" ];then
ln -sf "$provider_temp_file" "$TMPDIR"/provider_temp_file
else
echo -e "\033[33m正在获取在线模版\033[0m"
get_bin "$TMPDIR"/provider_temp_file rules/${coretype}_providers/${provider_temp_file}
get_bin "$TMPDIR"/provider_temp_file "rules/${coretype}_providers/$provider_temp_file"
[ -z "$(grep -o 'rules' "$TMPDIR"/provider_temp_file)" ] && {
echo -e "\033[31m下载失败请尝试更换安装源\033[0m"
. "$CRASHDIR"/menus/9_upgrade.sh && setserver
@@ -469,16 +469,16 @@ EOF
EOF
}
if [ -z "$(grep "provider_temp_${coretype}" "$CRASHDIR"/configs/ShellCrash.cfg)" ];then
provider_temp_file=$(sed -n "1 p" "$CRASHDIR"/configs/${coretype}_providers.list | awk '{print $2}')
provider_temp_file="$TMPDIR/$(sed -n "1 p" "$CRASHDIR"/configs/${coretype}_providers.list | awk '{print $2}')"
else
provider_temp_file=$(grep "provider_temp_${coretype}" "$CRASHDIR"/configs/ShellCrash.cfg | awk -F '=' '{print $2}')
fi
echo "-----------------------------------------------"
if [ -s ${provider_temp_file} ];then
ln -sf ${provider_temp_file} "$TMPDIR"/provider_temp_file
if [ -s "$provider_temp_file" ];then
ln -sf "$provider_temp_file" "$TMPDIR"/provider_temp_file
else
echo -e "\033[33m正在获取在线模版\033[0m"
get_bin "$TMPDIR"/provider_temp_file rules/${coretype}_providers/${provider_temp_file}
get_bin "$TMPDIR"/provider_temp_file "rules/${coretype}_providers/$provider_temp_file"
[ -z "$(grep -o 'route' "$TMPDIR"/provider_temp_file)" ] && {
echo -e "\033[31m下载失败请尝试更换安装源\033[0m"
. "$CRASHDIR"/menus/9_upgrade.sh && setserver