Browse Source

Bug fix

修正当 releases 页存在多个 release 文件时(现在统统都是这样了),脚本错误将多个文件下载并合并为一个 dat 文件的问题。
该问题会导致 dat 文件无法被 v2ctl 程序解析。

简化 geoip.dat 及 geosite.dat 文件的下载代码。
IceCodeNew 5 years ago
parent
commit
c7b5d178b7
1 changed files with 2 additions and 6 deletions
  1. 2 6
      release/user-package.sh

+ 2 - 6
release/user-package.sh

@@ -50,14 +50,10 @@ build_v2() {
 
 
 build_dat() {
 build_dat() {
 	echo ">>> Downloading newest geoip ..."
 	echo ">>> Downloading newest geoip ..."
-	wget -qO - https://api.github.com/repos/v2ray/geoip/releases/latest \
-	| grep browser_download_url | cut -d '"' -f 4 \
-	| wget -i - -O "$TMP"/geoip.dat
+	curl -s -L -o "$TMP"/geoip.dat "https://github.com/v2ray/geoip/raw/release/geoip.dat"
 
 
 	echo ">>> Downloading newest geosite ..."
 	echo ">>> Downloading newest geosite ..."
-	wget -qO - https://api.github.com/repos/v2ray/domain-list-community/releases/latest \
-	| grep browser_download_url | cut -d '"' -f 4 \
-	| wget -i - -O "$TMP"/geosite.dat
+	curl -s -L -o "$TMP"/geosite.dat "https://github.com/v2ray/domain-list-community/raw/release/dlc.dat"
 }
 }
 
 
 copyconf() {
 copyconf() {