Code

deal with versions ending in letters
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Fri, 18 Nov 2005 20:38:51 +0000 (20:38 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Fri, 18 Nov 2005 20:38:51 +0000 (20:38 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@721 a5681a0c-68f1-0310-ab6d-d61299d08faa

src/get_ver.awk

index 09d4e4029f35966add0e59d92f076b2a69a863ef..5abc22ba43e4c8659a0c4e56c9bcc91f3404cd0d 100644 (file)
@@ -5,6 +5,7 @@ BEGIN {
       split($1, t, "=");\r
       my_ver_str = substr(t[2],2,length(t[2])-2);\r
       split(my_ver_str, v, ".");\r
+      gsub("[^0-9].*$", "", v[3]);\r
       my_ver = v[1] "," v[2] "," v[3];\r
     }\r
     if (match ($0, /^NUMVERS=/)) {\r