From d04496de2626c38f384c9ec40a40c3343af11670 Mon Sep 17 00:00:00 2001 From: eeb Date: Tue, 30 Sep 2003 09:26:12 +0000 Subject: [PATCH] * Merged HEAD diffs --- lustre/scripts/version_tag.pl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lustre/scripts/version_tag.pl b/lustre/scripts/version_tag.pl index f33443f..334d2d6 100644 --- a/lustre/scripts/version_tag.pl +++ b/lustre/scripts/version_tag.pl @@ -9,13 +9,27 @@ use Time::Local; my $pristine = 1; my $kernver; +# Use the CVS tag first otherwise use the portals version sub get_tag() { my $tag; + my $line; my $tagfile = new IO::File; if (!$tagfile->open("CVS/Tag")) { - return "HEAD"; + my $verfile = new IO::File; + if (!$verfile->open("portals/include/config.h")) { + return "UNKNOWN"; + } + while(defined($line = <$verfile>)) { + $line =~ /\#define VERSION "(.*)"/; + if ($1) { + $tag = $1; + last; + } + } + $verfile->close(); + return $tag } else { my $tmp = <$tagfile>; $tagfile->close(); -- 1.8.3.1