add a build number
authorminima <minima>
Thu, 15 Mar 2001 00:26:30 +0000 (00:26 +0000)
committerminima <minima>
Thu, 15 Mar 2001 00:26:30 +0000 (00:26 +0000)
Changes
cmd/show/version.pl
perl/DXCommandmode.pm

diff --git a/Changes b/Changes
index ace7ca29c225d4aa8cc2548d9796ca547c66c734..baae35ff866acd60e4a4014e65b2c2c7c2694638 100644 (file)
--- 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
index b9bb950110e29e4834e2591c01a2bede9c5c3201..c4593b934002e9257cd057d695627d036a40fd4f 100644 (file)
@@ -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);
index 6e7a0944f5461c109d9b4a5d6a5106ba2092515b..197288d5249d84cf957f65b0dce901e11b11d164 100644 (file)
@@ -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);