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

Last change on this file since 27119 was 27119, checked in by jmt12, 11 years ago

Merging version finder from Medusa with the one lurking on Karearea

  • Property svn:executable set to *
File size: 311 bytes
RevLine 
[27040]1#!/usr/bin/perl
[27119]2use strict;
3use warnings;
[27040]4my $version_str = $^V;
[27052]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";
[27040]17exit;
Note: See TracBrowser for help on using the repository browser.