浏览代码

fix: support commit in links.txt

rufengsuixing 5 年之前
父节点
当前提交
fa20abc4c1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      root/usr/share/AdGuardHome/update_core.sh

+ 1 - 1
root/usr/share/AdGuardHome/update_core.sh

@@ -197,7 +197,7 @@ doupdate_core(){
 			local success="1"
 			break
 		fi
-	done < "/usr/share/AdGuardHome/links.txt"
+	done < $(grep -v "^#" /usr/share/AdGuardHome/links.txt)
 	[ -z "$success" ] && echo "no download success" && exit 1
 	if [ "${link##*.}" == "gz" ]; then
 		tar -zxf "/tmp/AdGuardHomeupdate/${link##*/}" -C "/tmp/AdGuardHomeupdate/"