X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=cmd%2Fshow%2Fversion.pl;h=c4593b934002e9257cd057d695627d036a40fd4f;hb=f884903785eaf4ec9bfea168170c1bb127becf5c;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=6b6a8002929017b6d4217f68fa492a2d728ee1fe;p=spider.git diff --git a/cmd/show/version.pl b/cmd/show/version.pl index e69de29b..c4593b93 100644 --- a/cmd/show/version.pl +++ b/cmd/show/version.pl @@ -0,0 +1,31 @@ +# +# show the version number of the software + copyright info +# +# Copyright (c) 1998 Dirk Koopman G1TLH +# +# $Id$ +# + +my @out; +my $build = $main::version; + +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);