[PATCH 13/18] version-gen: move v fix into sed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We are already using sed, might as well take advantage of it.

Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 GIT-VERSION-GEN | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 0691f481e4..fa0e72a32c 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -4,7 +4,7 @@ GVF=GIT-VERSION-FILE
 DEF_VER=2.40.GIT
 
 describe () {
-	git describe --match "v[0-9]*" --dirty 2>/dev/null | sed -e 's/-/./g'
+	git describe --match "v[0-9]*" --dirty 2>/dev/null | sed -e 's/-/./g' -e 's/^v//'
 }
 
 # First see if there is a version file (included in release tarballs),
@@ -14,7 +14,6 @@ then
 	VN=$(cat version)
 else
 	VN=$(describe)
-	VN=${VN#v}
 fi
 
 : "${VN:=$DEF_VER}"
-- 
2.40.0+fc1




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux