From 34373cc1dc001fb3d9ec5cce3e24e1277f43707e Mon Sep 17 00:00:00 2001 From: sunshineplan Date: Mon, 26 Nov 2018 15:23:38 +0800 Subject: [PATCH] Update install-release.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 由于稳定版本在版本末尾加.0了,所以检查更新的逻辑需要修改了 --- release/install-release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/install-release.sh b/release/install-release.sh index d2179e3d..e79377cb 100755 --- a/release/install-release.sh +++ b/release/install-release.sh @@ -197,7 +197,7 @@ getVersion(){ else VER=`/usr/bin/v2ray/v2ray -version 2>/dev/null` RETVAL="$?" - CUR_VER=`echo $VER | head -n 1 | cut -d " " -f2 | cut -d. -f-2` + CUR_VER=`echo $VER | head -n 1 | cut -d " " -f2` if [[ ${CUR_VER} != v* ]]; then CUR_VER=v${CUR_VER} fi @@ -211,7 +211,7 @@ getVersion(){ return 3 elif [[ $RETVAL -ne 0 ]];then return 2 - elif [[ "$NEW_VER" != "$CUR_VER" ]];then + elif [[ `echo $NEW_VER | cut -d. -f-2` != `echo $CUR_VER | cut -d. -f-2` ]];then return 1 fi return 0