mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-12 08:21:40 +00:00
~bug fix
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user