From: minima Date: Thu, 15 Mar 2001 00:26:30 +0000 (+0000) Subject: add a build number X-Git-Tag: R_1_47~115 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=fc56438e42beefbae283ef208f9e3959deddb2bf;p=spider.git add a build number --- 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);