Update Nlbench.sh

This commit is contained in:
Jensfrank 2024-07-18 01:04:57 +08:00 committed by GitHub
parent 45c2016731
commit c84aa8d0d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,13 +23,14 @@ check_update() {
echo "正在检查更新..."
# 从GitHub获取最新版本号
latest_version=$(curl -s https://raw.githubusercontent.com/everett7623/nodeloc_vps_test/main/version.sh)
latest_version=$(curl -s https://raw.githubusercontent.com/everett7623/nodeloc_vps_test/main/version.sh | tr -d '\n\r')
if [ -z "$latest_version" ]; then
echo "无法获取最新版本信息。"
return
fi
# 比较版本号
if [ "$CURRENT_VERSION" != "$latest_version" ]; then
echo "发现新版本: $latest_version"
echo "当前版本: $CURRENT_VERSION"