From 230fcb6649dea52aa96ed91493ba59a2df6a66db Mon Sep 17 00:00:00 2001 From: juewuy Date: Sat, 19 Sep 2020 09:29:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=89=E8=A3=85=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index b7d328b..d0704e7 100644 --- a/install.sh +++ b/install.sh @@ -7,8 +7,7 @@ echo "** ShellClash **" echo "** by Juewuy **" echo "***********************************************" url="https://cdn.jsdelivr.net/gh/juewuy/ShellClash" -url="http://127.0.0.1:8080/clash-for-Miwifi/" -#release_new=$(curl -kfsSL --resolve api.github.com:443:140.82.113.5 "https://api.github.com/repos/juewuy/ShellClash/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g') +release_new=$(curl -kfsSL --resolve api.github.com:443:140.82.113.5 "https://api.github.com/repos/juewuy/ShellClash/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g') [ -z "$release_new" ] && release_new=$(curl -kfsSL $url/bin/version | grep "versionsh" | awk -F "=" '{print $2}') [ -z "$release_new" ] && echo "无法连接服务器!" && exit echo -e "最新版本:\033[32m$release_new\033[0m" @@ -46,8 +45,7 @@ fi echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo 开始从服务器获取安装文件! echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -#tarurl=$url@$release_new/bin/clashfm.tar.gz -tarurl=$url/bin/clashfm.tar.gz +tarurl=$url@$release_new/bin/clashfm.tar.gz if command -v curl &> /dev/null; then result=$(curl -w %{http_code} -kLo /tmp/clashfm.tar.gz $tarurl) else $result @@ -81,7 +79,7 @@ cat >$dir/clash/mark<