root/gs2-extensions/parallel-building/trunk/src/bin/script/perl-version.pl @ 27119

Revision 27119, 311 bytes (checked in by jmt12, 8 years ago)

Merging version finder from Medusa with the one lurking on Karearea

  • Property svn:executable set to *
Line 
1#!/usr/bin/perl
2use strict;
3use warnings;
4my $version_str = $^V;
5if (defined $version_str && $version_str =~ /(\d+\.\d+\.\d+)/)
6{
7  print $1;
8  exit;
9}
10$version_str = $];
11if (defined $version_str && $version_str =~ /(\d+)\.(\d\d\d)(\d\d\d)/)
12{
13  printf("%d.%d.%d", $1, $2, $3);
14  exit;
15}
16print "unknown";
17exit;
Note: See TracBrowser for help on using the browser.