修复参数 -V cloud 云端脚本获取错误

This commit is contained in:
Hyy2001X 2021-06-13 21:48:37 +08:00
parent 1889933b9c
commit f4aad7c2c7
1 changed files with 4 additions and 4 deletions

View File

@ -435,7 +435,7 @@ EOF
DO_UPGRADE() { DO_UPGRADE() {
TIME g "正在更新固件,更新期间请耐心等待..." TIME g "正在更新固件,更新期间请耐心等待..."
sleep 1 sleep 3
$* $*
[[ $? -ne 0 ]] && { [[ $? -ne 0 ]] && {
TIME r "固件刷写失败,请尝试手动更新固件!" TIME r "固件刷写失败,请尝试手动更新固件!"
@ -470,13 +470,13 @@ AutoUpdate_Main() {
case "$1" in case "$1" in
-V) -V)
shift shift
case $1 in case "$1" in
local) local)
[[ -n ${Version} ]] && echo "${Version}" || echo "未知" [[ -n ${Version} ]] && echo "${Version}" || echo "未知"
;; ;;
cloud) cloud)
Cloud_Script_Version=$(wget -q --tries 3 --timeout 5 https://raw.fastgit.org/Hyy2001X/AutoBuild-Actions/master/Scripts/AutoUpdate.sh -O - | grep "export Version=" | cut -c16-200 | awk 'NR==1') Cloud_Script_Version="$(wget -q --tries 3 --timeout 5 https://raw.fastgit.org/Hyy2001X/AutoBuild-Actions/master/Scripts/AutoUpdate.sh -O - | egrep -o "V[0-9].+")"
[[ ${Cloud_Script_Version} ]] && echo "${Cloud_Script_Version}" || echo "未知" [[ -n ${Cloud_Script_Version} ]] && echo "${Cloud_Script_Version}" || echo "未知"
;; ;;
esac esac
EXIT 0 EXIT 0