Make it possible to match more digits than groups of one.

Signed-off-by: Anders Roxell <anders.rox...@linaro.org>
---
 scripts/git_hash.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh
index 6ba265e..336eb01 100755
--- a/scripts/git_hash.sh
+++ b/scripts/git_hash.sh
@@ -7,7 +7,8 @@ fi
 ROOTDIR=${1}
 
 if [ -d ${ROOTDIR}/.git ]; then
-       hash=$(git --git-dir=${ROOTDIR}/.git describe  --match 'v?\.?\.?\.?' | 
tr -d "\n")
+       hash=$(git --git-dir=${ROOTDIR}/.git describe --match 
'v[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*'\
+              | tr -d "\n")
        if [[ $(git --git-dir=${ROOTDIR}/.git diff --shortstat 2> /dev/null \
                | tail -n1) != "" ]]; then
                dirty=.dirty
-- 
2.1.4

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to