summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 14fd855)
raw | patch | inline | side by side (parent: 14fd855)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 13 Aug 2006 16:41:23 +0000 (16:41 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 13 Aug 2006 16:41:23 +0000 (16:41 +0000) |
program/src/get_ver.awk | patch | blob | history |
index 361294ab80f173c6d378b0ba019507e1a1f3083d..3f6d5e91ad4b60b4a42e3456d430ef7795742d67 100644 (file)
--- a/program/src/get_ver.awk
+++ b/program/src/get_ver.awk
-# fetch rrdtool version number from input file and write them to STDOUT\r
-BEGIN {\r
- while ((getline < ARGV[1]) > 0) {\r
- if (match ($0, /^AC_INIT/)) {\r
- split($1, t, ",");\r
- my_ver_str = substr(t[2],2,length(t[2])-3);\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
- split($1, t, "=");\r
- my_num_ver = t[2];\r
- }\r
- }\r
- print "RRD_VERSION = " my_ver "";\r
- print "RRD_VERSION_STR = " my_ver_str "";\r
- print "RRD_NUMVERS = " my_num_ver "";\r
-}\r
+# fetch rrdtool version number from input file and write them to STDOUT
+BEGIN {
+ while ((getline < ARGV[1]) > 0) {
+ if (match ($0, /^AC_INIT/)) {
+ split($1, t, ",");
+ my_ver_str = substr(t[2],2,length(t[2])-3);
+ split(my_ver_str, v, ".");
+ gsub("[^0-9].*$", "", v[3]);
+ my_ver = v[1] "," v[2] "," v[3];
+ }
+ if (match ($0, /^NUMVERS=/)) {
+ split($1, t, "=");
+ my_num_ver = t[2];
+ }
+ }
+ print "RRD_VERSION = " my_ver "";
+ print "RRD_VERSION_STR = " my_ver_str "";
+ print "RRD_NUMVERS = " my_num_ver "";
+}