+# calculate build number
+$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 "$main::root/perl/$fn" or next;
+ while (<$f>) {
+ if (/^#\s+\$Id:\s+[\w\._]+,v\s+(\d+\.\d+)/ ) {
+ $build += $1;
+ last;
+ }
+ }
+ $f->close;
+ }
+ }
+}
+
+Log('cluster', "DXSpider V$version, build $build started");