From: Tobias Oetiker Date: Sun, 13 Aug 2006 16:41:23 +0000 (+0000) Subject: use unix fileendings here! X-Git-Tag: 1.2.16~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cb8941c4da6dd9228efab160637b774fa2b80f4;p=thirdparty%2Frrdtool-1.x.git use unix fileendings here! git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@877 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/get_ver.awk b/src/get_ver.awk index 361294ab..3f6d5e91 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 ""; +}