scripts: checkpatch: Fix version match pattern

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If9fc4a5250cb6d7fd1ca4bf92bab3df21441293a
This commit is contained in:
Joseph Chen
2023-09-28 08:47:36 +00:00
committed by Xuhui Lin
parent 62ec1856c1
commit 38da0674a2

View File

@@ -416,7 +416,7 @@ function check_version()
continue
fi
NAME_VER=`echo ${FILE} | grep -o 'v[0-9].[0-9][0-9]'`
NAME_VER=`echo ${FILE} | grep -o 'v[0-9][.][0-9][0-9]'`
# ignore version < v1.00
if [[ "${NAME_VER}" == *v0.* ]]; then
continue
@@ -426,7 +426,7 @@ function check_version()
echo "ERROR: ${FILE}: No \"fwver: \" string found in binary"
exit 1
fi
FW_VER=`strings ${FILE} | grep -o 'fwver: v[1-9].[0-9][0-9]' | awk '{ print $2 }'`
FW_VER=`strings ${FILE} | grep -o 'fwver: v[1-9][.][0-9][0-9]' | awk '{ print $2 }'`
if [ "${NAME_VER}" != "${FW_VER}" ] ; then
echo "ERROR: ${FILE}: file version is ${NAME_VER}, but fw version is ${FW_VER}."
exit 1