Update install-release.sh

由于稳定版本在版本末尾加.0了,所以检查更新的逻辑需要修改了
pull/1435/head
sunshineplan 2018-11-26 15:23:38 +08:00 committed by GitHub
parent 45fbf6f059
commit 34373cc1dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -197,7 +197,7 @@ getVersion(){
else else
VER=`/usr/bin/v2ray/v2ray -version 2>/dev/null` VER=`/usr/bin/v2ray/v2ray -version 2>/dev/null`
RETVAL="$?" 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 if [[ ${CUR_VER} != v* ]]; then
CUR_VER=v${CUR_VER} CUR_VER=v${CUR_VER}
fi fi
@ -211,7 +211,7 @@ getVersion(){
return 3 return 3
elif [[ $RETVAL -ne 0 ]];then elif [[ $RETVAL -ne 0 ]];then
return 2 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 return 1
fi fi
return 0 return 0