From 8bb45229b5f7dc5c2d5715be208ccb25c43f02db Mon Sep 17 00:00:00 2001 From: Hyy2001X <1804430051@qq.com> Date: Thu, 13 May 2021 18:47:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8B=E8=BD=BD=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/AutoUpdate.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Scripts/AutoUpdate.sh b/Scripts/AutoUpdate.sh index dc58fb3..fdef24e 100755 --- a/Scripts/AutoUpdate.sh +++ b/Scripts/AutoUpdate.sh @@ -63,7 +63,7 @@ EOF Install_Pkg() { export PKG_NAME=$1 - if [[ ! "$(cat /${Download_Path}/Installed_PKG_List)" =~ "${PKG_NAME}" ]];then + if [[ ! "$(cat ${Download_Path}/Installed_PKG_List)" =~ "${PKG_NAME}" ]];then [[ "${Force_Update}" == 1 ]] || [[ "${AutoUpdate_Mode}" == 1 ]] && { export Choose=Y } || { @@ -121,8 +121,7 @@ export TMP_Available="$(df -m | grep "/tmp" | awk '{print $4}' | awk 'NR==1' | a export Overlay_Available="$(df -h | grep ":/overlay" | awk '{print $4}' | awk 'NR==1')" export Retry_Times=4 [ ! -d "${Download_Path}" ] && mkdir -p ${Download_Path} -opkg list | awk '{print $1}' > /${Download_Path}/Installed_PKG_List -[ ! -d "${Download_Path}" ] && mkdir -p ${Download_Path} +opkg list | awk '{print $1}' > ${Download_Path}/Installed_PKG_List case ${DEFAULT_Device} in x86_64) [[ -z "${Firmware_Type}" ]] && Firmware_Type=img @@ -252,7 +251,7 @@ else esac fi if [[ -z "${PROXY_Release}" ]];then - if [[ "$(cat /${Download_Path}/Installed_PKG_List)" =~ curl ]];then + if [[ "$(cat ${Download_Path}/Installed_PKG_List)" =~ curl ]];then export Google_Check=$(curl -I -s --connect-timeout 3 google.com -w %{http_code} | tail -n1) [[ ! "$Google_Check" == 301 ]] && { TIME r "Google 连接失败,尝试使用 [FastGit] 镜像加速!"