Changeset 27478

Show
Ignore:
Timestamp:
27.05.2013 12:14:01 (6 years ago)
Author:
jmt12
Message:

Be a bit smarter about locating Perl version if not provided (rather than just dying)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/perllib/FileUtils/HDThriftFS.pm

    r27424 r27478  
    4545  die "GEXTPARALLELBUILDING not set\n" unless defined $ENV{'GEXTPARALLELBUILDING'}; 
    4646  die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'}; 
     47  # We need the Perl version before continuing 
     48  if (!defined $ENV{'PERL_VERSION'}) 
     49  { 
     50    $ENV{'PERL_VERSION'} = `perl -S $ENV{'GEXTPARALLELBUILDING'}/bin/script/perl-version.pl`; 
     51  } 
    4752  die "PERL_VERSION not set\n" unless defined $ENV{'PERL_VERSION'}; 
    4853  # Bit::Vector and Thrift modules 
    4954  unshift (@INC, $ENV{'GEXTPARALLELBUILDING'} . '/' . $ENV{'GSDLOS'} . '/lib/perl/' . $ENV{'PERL_VERSION'}); 
    5055  # ThriftFS Perl API 
    51   unshift (@INC, $ENV{'GEXTPARALLELBUILDING'} . '/packages/hadoop-1.1.0/contrib/thriftfs/gen-perl'); 
     56  unshift (@INC, $ENV{'GEXTPARALLELBUILDING'} . '/packages/ThriftFS-0.9.0/gen-perl'); 
    5257} 
    5358