From 4be6c79fe9a1d31dc5178da998acec16c51561ef Mon Sep 17 00:00:00 2001 From: juewuy Date: Sun, 30 Jan 2022 14:41:48 +0200 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 41018e8..726cbcc 100644 --- a/install.sh +++ b/install.sh @@ -28,6 +28,7 @@ webget(){ [ "$3" = "echooff" ] && progress='-s' || progress='-#' [ -z "$4" ] && redirect='-L' || redirect='' result=$(curl -w %{http_code} --connect-timeout 5 $progress $redirect -ko $1 $2) + [ -z $(echo $result | grep -e ^2) && result="200" else if wget --version > /dev/null 2>&1;then [ "$3" = "echooff" ] && progress='-q' || progress='-q --show-progress' @@ -72,7 +73,7 @@ tarurl=$url2/bin/clashfm.tar.gz gettar(){ webget /tmp/clashfm.tar.gz $tarurl - [ "$result" != "200" ] && echo "文件下载失败!" && exit 1 + [ "$result" != "200" ] && echo "文件下载失败,请尝试使用其他安装源!" && exit 1 $clashdir/start.sh stop 2>/dev/null #解压 echo -----------------------------------------------