Skip to content
This repository was archived by the owner on Feb 20, 2024. It is now read-only.

Commit fe8aca4

Browse files
committed
feat: add switcher of master and dev
1 parent 9cfe7ad commit fe8aca4

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

install.sh

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3972,12 +3972,26 @@ removeUser() {
39723972
}
39733973
# 更新脚本
39743974
updateV2RayAgent() {
3975+
local scriptType=
3976+
echoContent red "\n=============================================================="
3977+
echoContent yellow "1.升级到最新稳定版"
3978+
echoContent yellow "2.升级到最新开发版"
3979+
echoContent red "=============================================================="
3980+
read -r -p "请选择:" selectScriptType
3981+
if [[ "${selectScriptType}" == "1" ]]; then
3982+
scriptType="master"
3983+
elif [[ "${selectScriptType}" == "2" ]]; then
3984+
scriptType="dev"
3985+
else
3986+
updateV2RayAgent
3987+
fi
3988+
39753989
echoContent skyBlue "\n进度 $1/${totalProgress} : 更新v2ray-agent脚本"
39763990
rm -rf /etc/v2ray-agent/install.sh
39773991
if wget --help | grep -q show-progress; then
3978-
wget -c -q --show-progress -P /etc/v2ray-agent/ -N --no-check-certificate "https://raw.githubusercontent.com/reeceyng/v2ray-agent/master/install.sh"
3992+
wget -c -q --show-progress -P /etc/v2ray-agent/ -N --no-check-certificate "https://raw.githubusercontent.com/reeceyng/v2ray-agent/${scriptType}/install.sh"
39793993
else
3980-
wget -c -q -P /etc/v2ray-agent/ -N --no-check-certificate "https://raw.githubusercontent.com/reeceyng/v2ray-agent/master/install.sh"
3994+
wget -c -q -P /etc/v2ray-agent/ -N --no-check-certificate "https://raw.githubusercontent.com/reeceyng/v2ray-agent/${scriptType}/install.sh"
39813995
fi
39823996

39833997
sudo chmod 700 /etc/v2ray-agent/install.sh
@@ -3988,7 +4002,7 @@ updateV2RayAgent() {
39884002
echoContent yellow " ---> 请手动执行[vasma]打开脚本"
39894003
echoContent green " ---> 当前版本:${version}\n"
39904004
echoContent yellow "如更新不成功,请手动执行下面命令\n"
3991-
echoContent skyBlue "wget -P /root -N --no-check-certificate https://raw.githubusercontent.com/reeceyng/v2ray-agent/master/install.sh && chmod 700 /root/install.sh && /root/install.sh"
4005+
echoContent skyBlue "wget -P /root -N --no-check-certificate https://raw.githubusercontent.com/reeceyng/v2ray-agent/${scriptType}/install.sh && chmod 700 /root/install.sh && /root/install.sh"
39924006
echo
39934007
exit 0
39944008
}
@@ -5433,7 +5447,7 @@ menu() {
54335447
echoContent red "\n=============================================================="
54345448
echoContent green "作者:Reece"
54355449
echoContent green "原作者:mack-a"
5436-
echoContent green "当前版本:v2.6.14"
5450+
echoContent green "当前版本:v2.6.15"
54375451
echoContent green "Github:https://github.com/reeceyng/v2ray-agent"
54385452
echoContent green "描述:八合一共存脚本\c"
54395453
showInstallStatus

0 commit comments

Comments
 (0)