[Sound-open-firmware] [PATCH] version.sh: fix FW version parsing

Liam Girdwood liam.r.girdwood at linux.intel.com
Mon Jun 4 13:03:40 CEST 2018


From: Kamil Kulesza <kamil.kulesza at linux.intel.com>

Fixed version.sh script - now it handles longer build names.

Signed-off-by: Kamil Kulesza <kamil.kulesza at linux.intel.com>
---
 version.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/version.sh b/version.sh
index 815c0b8..bfa71e3 100755
--- a/version.sh
+++ b/version.sh
@@ -15,7 +15,7 @@ GIT_TAG=`git describe --abbrev=4`
 
 # Some releases have a SOF_FW_XXX_ prefix on the tag and this prefix
 # must be stripped for usage in version.h. i.e. we just need the number.
-if [ $(expr match $GIT_TAG 'SOF_FW_[A-Z][A-Z][A-Z]_' ) -eq 11 ]; then
+if [ $(expr match $GIT_TAG 'SOF_FW_[A-Z]+_' ) -lt 15 ]; then
 	VER=`echo $GIT_TAG | cut -d_ -f4`
 else
 	VER=$GIT_TAG
-- 
2.17.0



More information about the Sound-open-firmware mailing list