Show
Ignore:
Timestamp:
03.08.2011 21:17:30 (8 years ago)
Author:
ak19
Message:

The method of locating perl has changed once more: util now defines the fuction get_perl_exec which is used by other scripts to obtain the path to the perl executable they should use.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/incremental-buildcol.pl

    r24192 r24362  
    4242no strict 'subs'; # allow barewords (eg STDERR) as function arguments 
    4343 
    44 use Config; # for getting the perlpath in the recommended way 
    4544use util; 
    4645use colcfg; 
     
    9291    print STDERR "Unable to use collection \"$collection\" within \"$collect_dir\"\n"; 
    9392    exit -1; 
    94     }    
    95  
     93    } 
    9694 
    9795    if (!defined $build_dir) { 
     
    103101    my $quoted_argv = join(" ", map { "\"$_\"" } @filtered_argv); 
    104102     
    105     my $buildcol_cmd = "buildcol.pl"; 
    106     if($ENV{'PERLPATH'}) { 
    107     # need to ensure that the path to perl is quoted (in case there's spaces in it) 
    108     if($ENV{'GSDLOS'} =~ m/windows/) {   
    109         $buildcol_cmd = "\"$ENV{'PERLPATH'}\\Perl.exe\" -S $buildcol_cmd"; 
    110     } else { 
    111         $buildcol_cmd = "\"$ENV{'PERLPATH'}/perl\" -S $buildcol_cmd"; 
    112     } 
    113     } else { 
    114     #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in 
    115     $buildcol_cmd = "\"$Config{perlpath}\" -S $buildcol_cmd"; 
    116     } 
     103    my $buildcol_cmd = "\"".&util::get_perl_exec()."\" -S buildcol.pl"; 
    117104 
    118105    # Read in the collection configuration file.