Update menu.sh

Former-commit-id: 36342450dcb74ac75d1b34ec064334078630a279
This commit is contained in:
fscarmen
2021-09-22 16:38:56 +08:00
committed by GitHub
parent 7a84360a0b
commit 122fb22110
+2 -1
View File
@@ -127,8 +127,9 @@ install(){
latest=$(wget --no-check-certificate -qO- -t1 -T2 "https://api.github.com/repos/ViRb3/wgcf/releases/latest" | grep "tag_name" | head -n 1 | cut -d : -f2 | sed 's/\"//g;s/v//g;s/,//g;s/ //g')
[[ -z $latest ]] && latest='2.2.8'
# 安装 wgcf
# 安装 wgcf,尽量下载官方的最新版本,如官方 wgcf 下载不成功,将使用 jsDelivr 的 CDN,以更好的支持双栈
wget -N --no-check-certificate -O /usr/local/bin/wgcf https://github.com/ViRb3/wgcf/releases/download/v$latest/wgcf_${latest}_linux_$architecture
[[ $? != 0 ]] && wget -N --no-check-certificate -O /usr/local/bin/wgcf https://cdn.jsdelivr.net/gh/fscarmen/warp/wgcf_2.2.8_linux_$architecture
# 添加执行权限
chmod +x /usr/local/bin/wgcf