mirror of
https://github.com/mack-a/v2ray-agent.git
synced 2026-09-02 13:56:37 +00:00
feat(脚本): 更新core时增加展示最新版本
This commit is contained in:
+11
-4
@@ -2285,7 +2285,7 @@ installSingBox() {
|
|||||||
|
|
||||||
version=$(curl -s "https://api.github.com/repos/SagerNet/sing-box/releases?per_page=20" | jq -r ".[]|select (.prerelease==${prereleaseStatus})|.tag_name" | head -1)
|
version=$(curl -s "https://api.github.com/repos/SagerNet/sing-box/releases?per_page=20" | jq -r ".[]|select (.prerelease==${prereleaseStatus})|.tag_name" | head -1)
|
||||||
|
|
||||||
echoContent green " ---> sing-box版本:${version}"
|
echoContent green " ---> 最新版本:${version}"
|
||||||
|
|
||||||
if [[ "${release}" == "alpine" ]]; then
|
if [[ "${release}" == "alpine" ]]; then
|
||||||
wget -c -q -P /etc/v2ray-agent/sing-box/ "https://github.com/SagerNet/sing-box/releases/download/${version}/sing-box-${version/v/}${singBoxCoreCPUVendor}.tar.gz"
|
wget -c -q -P /etc/v2ray-agent/sing-box/ "https://github.com/SagerNet/sing-box/releases/download/${version}/sing-box-${version/v/}${singBoxCoreCPUVendor}.tar.gz"
|
||||||
@@ -2307,7 +2307,11 @@ installSingBox() {
|
|||||||
chmod 655 /etc/v2ray-agent/sing-box/sing-box
|
chmod 655 /etc/v2ray-agent/sing-box/sing-box
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echoContent green " ---> sing-box版本:v$(/etc/v2ray-agent/sing-box/sing-box version | grep "sing-box version" | awk '{print $3}')"
|
echoContent green " ---> 当前版本:v$(/etc/v2ray-agent/sing-box/sing-box version | grep "sing-box version" | awk '{print $3}')"
|
||||||
|
|
||||||
|
version=$(curl -s "https://api.github.com/repos/SagerNet/sing-box/releases?per_page=20" | jq -r ".[]|select (.prerelease==${prereleaseStatus})|.tag_name" | head -1)
|
||||||
|
echoContent green " ---> 最新版本:${version}"
|
||||||
|
|
||||||
if [[ -z "${lastInstallationConfig}" ]]; then
|
if [[ -z "${lastInstallationConfig}" ]]; then
|
||||||
read -r -p "是否更新、升级?[y/n]:" reInstallSingBoxStatus
|
read -r -p "是否更新、升级?[y/n]:" reInstallSingBoxStatus
|
||||||
if [[ "${reInstallSingBoxStatus}" == "y" ]]; then
|
if [[ "${reInstallSingBoxStatus}" == "y" ]]; then
|
||||||
@@ -2485,7 +2489,10 @@ updateXray() {
|
|||||||
handleXray stop
|
handleXray stop
|
||||||
handleXray start
|
handleXray start
|
||||||
else
|
else
|
||||||
echoContent green " ---> 当前Xray-core版本:$(/etc/v2ray-agent/xray/xray --version | awk '{print $2}' | head -1)"
|
echoContent green " ---> 当前版本:v$(/etc/v2ray-agent/xray/xray --version | awk '{print $2}' | head -1)"
|
||||||
|
remoteVersion=$(curl -s "https://api.github.com/repos/XTLS/Xray-core/releases?per_page=5" | jq -r ".[]|select (.prerelease==${prereleaseStatus})|.tag_name" | head -1)
|
||||||
|
|
||||||
|
echoContent green " ---> 最新版本:${remoteVersion}"
|
||||||
|
|
||||||
if [[ -n "$1" ]]; then
|
if [[ -n "$1" ]]; then
|
||||||
version=$1
|
version=$1
|
||||||
@@ -9489,7 +9496,7 @@ menu() {
|
|||||||
cd "$HOME" || exit
|
cd "$HOME" || exit
|
||||||
echoContent red "\n=============================================================="
|
echoContent red "\n=============================================================="
|
||||||
echoContent green "作者:mack-a"
|
echoContent green "作者:mack-a"
|
||||||
echoContent green "当前版本:v3.4.31"
|
echoContent green "当前版本:v3.4.32"
|
||||||
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
||||||
echoContent green "描述:八合一共存脚本\c"
|
echoContent green "描述:八合一共存脚本\c"
|
||||||
showInstallStatus
|
showInstallStatus
|
||||||
|
|||||||
Reference in New Issue
Block a user