From fc56438e42beefbae283ef208f9e3959deddb2bf Mon Sep 17 00:00:00 2001 From: minima Date: Thu, 15 Mar 2001 00:26:30 +0000 Subject: [PATCH] add a build number --- Changes | 1 + cmd/show/version.pl | 19 ++++++++++++++++++- perl/DXCommandmode.pm | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index ace7ca29..baae35ff 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ 14Mar01======================================================================= 1. first cut at outgoing ax25 /external program connects 2. slight change of interface to connect +3. added a build number to sh/version 13Mar01======================================================================= 1. implemented first cut at non blocking connect 2. removed memory leakage in connects diff --git a/cmd/show/version.pl b/cmd/show/version.pl index b9bb9501..c4593b93 100644 --- a/cmd/show/version.pl +++ b/cmd/show/version.pl @@ -7,8 +7,25 @@ # my @out; +my $build = $main::version; -push @out, "DX Spider Cluster version $main::version on \u$^O"; +if (opendir(DIR, "$main::root/perl")) { + my @d = readdir(DIR); + closedir(DIR); + foreach my $fn (@d) { + if ($fn =~ /^cluster\.pl$/ || $fn =~ /\.pm$/) { + my $f = new IO::File $fn or next; + while (<$f>) { + if (/^#\s+\$Id:\s+[\w\._]+,v\s+(\d+\.\d+)/ ) { + $build += $1; + last; + } + } + $f->close; + } + } +} +push @out, "DX Spider Cluster version $main::version (build $build) on \u$^O"; push @out, "Copyright (c) 1998-2001 Dirk Koopman G1TLH"; return (1, @out); diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 6e7a0944..197288d5 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -30,6 +30,7 @@ use AnnTalk; use WCY; use Sun; use Internet; +use IO::File; use strict; use vars qw(%Cache %cmd_cache $errstr %aliases $scriptbase); -- 2.43.0