From 5eca115ce6997e085949a00b3ed26862966870bf Mon Sep 17 00:00:00 2001 From: fscarmen <62703343+fscarmen@users.noreply.github.com> Date: Thu, 21 Apr 2022 19:04:30 +0800 Subject: [PATCH] Update t.sh --- old/t.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/old/t.sh b/old/t.sh index 5e199a9..4d85886 100644 --- a/old/t.sh +++ b/old/t.sh @@ -250,10 +250,10 @@ install(){ green "\n ${T[${L}11]}\n " latest=$(curl -fsSL "https://api.github.com/repos/ViRb3/wgcf/releases/latest" | grep "tag_name" | head -n 1 | cut -d : -f2 | sed 's/[ \"v,]//g') latest=${latest:-'2.2.13'} - curl -m8 -o /usr/local/bin/wgcf https://raw.githubusercontents.com/fscarmen/warp/main/wgcf/wgcf_"$latest"_darwin_amd64 + [[ ! -e /usr/local/bin/wgcf ]] && curl -m8 -o /usr/local/bin/wgcf https://raw.githubusercontents.com/fscarmen/warp/main/wgcf/wgcf_"$latest"_darwin_amd64 # 安装 wireguard-go - curl -o /usr/local/bin/wireguard-go_darwin_amd64.tar.gz https://raw.githubusercontents.com/fscarmen/warp/main/wireguard-go/wireguard-go_darwin_amd64.tar.gz && + [[ ! -e /usr/local/bin/wireguard-go ]] && curl -o /usr/local/bin/wireguard-go_darwin_amd64.tar.gz https://raw.githubusercontents.com/fscarmen/warp/main/wireguard-go/wireguard-go_darwin_amd64.tar.gz && tar xzf /usr/local/bin/wireguard-go_darwin_amd64.tar.gz -C /usr/local/bin/ && rm -f /usr/local/bin/wireguard-go_darwin_amd64.tar.gz # 添加执行权限