X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fversion.pl;h=fb84ab2cbdf50320a3f8ebfa33732648d5cb397d;hb=c7dcee3eb996f8a0741ce11ca3615af7cca8ca63;hp=fe0cf3d74e00826002e895e5f2bc38e936f177aa;hpb=780d82f8b97e67e93d4097de639f1e375223cda0;p=spider.git diff --git a/cmd/show/version.pl b/cmd/show/version.pl index fe0cf3d7..fb84ab2c 100644 --- a/cmd/show/version.pl +++ b/cmd/show/version.pl @@ -7,8 +7,27 @@ # my @out; +my $build = $main::version; -push @out, "DX Spider Cluster version $main::version"; -push @out, "Copyright (c) 1998-2000 Dirk Koopman G1TLH"; +use IO::File; + +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);