X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fget_ver.awk;h=3f6d5e91ad4b60b4a42e3456d430ef7795742d67;hb=2e6c98e893777e4abf7b05cb4ecf81dde088cdb8;hp=361294ab80f173c6d378b0ba019507e1a1f3083d;hpb=db29017f473c15fa6b8f0490093f339fb3f5424e;p=rrdtool.git diff --git a/src/get_ver.awk b/src/get_ver.awk index 361294a..3f6d5e9 100644 --- a/src/get_ver.awk +++ b/src/get_ver.awk @@ -1,19 +1,19 @@ -# 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 ""; -} +# 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 ""; +}