Update install-release.sh (#16)

更改安装路径到 v2fly/v2ray-core
pull/2590/head
JH2628 2020-06-23 06:11:05 +08:00 committed by GitHub
parent b4a071a3bb
commit 98a5d3fc7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
# This file is accessible as https://install.direct/go.sh
# Original source is located at github.com/v2ray/v2ray-core/release/install-release.sh
# Original source is located at github.com/v2fly/v2ray-core/release/install-release.sh
# If not specify, default meaning of return value:
# 0: Success
@ -176,7 +176,7 @@ downloadV2Ray(){
if [[ "${DIST_SRC}" == "jsdelivr" ]]; then
DOWNLOAD_LINK="https://cdn.jsdelivr.net/gh/v2ray/dist/v2ray-linux-${VDIS}.zip"
else
DOWNLOAD_LINK="https://github.com/v2ray/v2ray-core/releases/download/${NEW_VER}/v2ray-linux-${VDIS}.zip"
DOWNLOAD_LINK="https://github.com/v2fly/v2ray-core/releases/download/${NEW_VER}/v2ray-linux-${VDIS}.zip"
fi
colorEcho ${BLUE} "Downloading V2Ray: ${DOWNLOAD_LINK}"
curl ${PROXY} -L -H "Cache-Control: no-cache" -o ${ZIPFILE} ${DOWNLOAD_LINK}
@ -254,7 +254,7 @@ getVersion(){
VER="$(/usr/bin/v2ray/v2ray -version 2>/dev/null)"
RETVAL=$?
CUR_VER="$(normalizeVersion "$(echo "$VER" | head -n 1 | cut -d " " -f2)")"
TAG_URL="https://api.github.com/repos/v2ray/v2ray-core/releases/latest"
TAG_URL="https://api.github.com/repos/v2fly/v2ray-core/releases/latest"
NEW_VER="$(normalizeVersion "$(curl ${PROXY} -H "Accept: application/json" -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0" -s "${TAG_URL}" --connect-timeout 10| grep 'tag_name' | cut -d\" -f4)")"
if [[ $? -ne 0 ]] || [[ $NEW_VER == "" ]]; then