Update Nlbench.sh

This commit is contained in:
Jensfrank 2024-07-18 01:36:08 +08:00 committed by GitHub
parent 5b78fb9aaa
commit 5159adf3f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,8 +22,8 @@ colors=(
check_update() {
echo "正在检查更新..."
# 从GitHub获取最新版本号
latest_version=$(curl -s https://raw.githubusercontent.com/everett7623/nodeloc_vps_test/main/version.sh | tail -n 1 | grep -o "v[0-9]\+\.[0-9]\+\.[0-9]\+")
# 从GitHub获取最新版本号(去除注释和空行后提取最后一个版本号)
latest_version=$(curl -s https://raw.githubusercontent.com/everett7623/nodeloc_vps_test/main/version.sh | grep -E "v[0-9]+\.[0-9]+\.[0-9]+" | tail -n 1 | grep -o "v[0-9]\+\.[0-9]\+\.[0-9]\+")
if [ -z "$latest_version" ]; then
echo "无法获取最新版本信息。"