Changeset 27684

Show
Ignore:
Timestamp:
21.06.2013 12:22:25 (6 years ago)
Author:
jmt12
Message:

Adding natural sorting into report generation - so also needed to add INC building code typical of GS scripts

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/bin/script/hadoop_report.pl

    r27669 r27684  
    33use strict; 
    44use warnings; 
     5 
     6# Requires setup.bash to have been sourced 
     7BEGIN 
     8{ 
     9  die "GSDLHOME not set\n" unless defined $ENV{'GSDLHOME'}; 
     10  die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'}; 
     11  # Ensure Greenstone Perl locations are in INC 
     12  unshift (@INC, $ENV{'GSDLHOME'} . '/perllib'); 
     13  unshift (@INC, $ENV{'GSDLHOME'} . '/perllib/cpan'); 
     14  # we'll need the perl version number 
     15  my ($version_number) = `perl-version.pl`; 
     16  if (defined $ENV{'GSDLEXTS'}) 
     17  { 
     18    my @extensions = split(/:/,$ENV{'GSDLEXTS'}); 
     19    foreach my $e (@extensions) 
     20    { 
     21      my $ext_prefix = $ENV{'GSDLHOME'} . '/ext/' . $e; 
     22      unshift (@INC, $ext_prefix . '/perllib'); 
     23      unshift (@INC, $ext_prefix . '/perllib/cpan'); 
     24      unshift (@INC, $ext_prefix . '/' . $ENV{'GSDLOS'} . '/lib/perl/' . $version_number); 
     25    } 
     26  } 
     27} 
    528 
    629use Devel::Peek;