scripts: checkpatch: Match fw version only once
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: I125615f9f02c3c1f15a65369b1506526e62a2577
This commit is contained in:
@@ -430,9 +430,9 @@ 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 -m 1 -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}."
|
||||
echo "ERROR: ${FILE}: file version is '${NAME_VER}', but fw version is '${FW_VER}'."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user